Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging not working as expected #136

Closed
connecties opened this issue Sep 28, 2015 · 13 comments
Closed

Debugging not working as expected #136

connecties opened this issue Sep 28, 2015 · 13 comments
Assignees
Labels
Milestone

Comments

@connecties
Copy link

using Eclipse Kepler SR 2, build id: 20140224-0627,
cucumber plugin: 0.0.11.201406031952
Using Java 7 (SDK: 1.7.0_45_64)

If I right click on my feature file and choose debug, eclipse starts running and executing my feature file. It asks me if I want to switch to debug view. (I click "yes") and it switches the view and stops processing.
What I expect it to do is switch to the file I have put my breakpoint in and highlite the line the breakpoint is on.
The debug thread view is telling me the correct file and line processing is stopped at.
Clicking one of the lines in this view does not do anything.

If I debug a pure java application I can click these lines and the file view changes to the file mentioned in the line and the specific line is highlited.

Is this a known issue? ( If so, I did not search well enough. Shame on me)
What to do so it will debug correctly?
Regards.

@nurb337
Copy link

nurb337 commented Oct 13, 2015

I had a similar experience. I use JUnit and got debugging to work by creating a new JUnit debug configuration. I set the project name, test class (name of the package and class containing the test runner), and set Test runner to JUnit 4. This works fine - breakpoints are highlighted as I step through the code and I can see which steps are successful in the JUnit output tab.

@gibsonm
Copy link

gibsonm commented Nov 19, 2015

I'm having the same issues. However, I also get a dialog saying:

"Unable to install breakpoint in .... due to missing line number attributes. Modify compiler options to generate line number attributes." Interestingly it has a Guice related part in the error message. Not sure if that's a red herring.

image

I've looked at the compiler options, and everything seems to be set correctly (i.e. line number generation has been set)

Has anyone seen this and got a fix?

Thanks

@ihodges
Copy link

ihodges commented Feb 7, 2018

This problem is due to a missing call to

setDefaultSourceLocator(launch, config);

in CucumberFeatureLocalApplicationLaunchConfigurationDelegate.

@Flaburgan
Copy link

@girijant any chance you can have a look at that issue? Is there anything I can do to help?

@girijant
Copy link
Member

@Flaburgan,
Please share issues in detail with current plugin version, proper use cases, snapshots, error logs(if any) and actual/expected behaviour for better understanding.

Thanks,
-Girija

@Flaburgan
Copy link

Flaburgan commented Feb 16, 2018

With the very last version (0.21 2nd minor fixes):

Steps to reproduce:

  • Add a breakpoint to a step definition file
  • In the feature file, Right click -> Debug as -> Cucumber feature
  • Eclipse switches to the debug perspective
  • The "debug" view is stopped on the breakpoint line

Expected behavior:
Normal eclipse debug behavior:

  • Eclipse switch the current file from the feature file to the step definition file with focus on the breakpoint line
  • When "Step Over" button is clicked, the focus go to the next line
  • When "Step Into" button is clicked, the focus go into the function, opening the file where the function is defined

Actual behavior:

  • The feature file is still selected
  • Clicking on "Step Over" or "Step Into" correctly execute the code (see "Debug" view) but does not change the line focused.

@jchoate49
Copy link

I was wondering if this was ever fixed as I have the same problem going on with Cucumber plugin and Eclipse.

@laeubi
Copy link
Contributor

laeubi commented May 24, 2019

Currently the launching does not work very well (see #190) I'm working on fixing this and probably then the debuging will work also.

@laeubi laeubi self-assigned this Aug 11, 2019
@laeubi laeubi added this to the 1.0.0 milestone Aug 11, 2019
@TAkbay
Copy link

TAkbay commented Jun 2, 2020

I'm facing this issue, too. Is there any solution coming for the next time?

@rive91
Copy link

rive91 commented Jun 15, 2020

Found this too, is there any ETA for the fix?

@jbaconsult
Copy link

I can confirm this problem. The issue rises, when directly running a cucumber feature. It is not happening when running via JUnit context. Unfortunately we use one single JUnit-Test to run all our 150 feature files. Therefore it would be much nicer to directly debug a feature.

@laeubi laeubi modified the milestones: 1.0.0, 2.0.0 Apr 28, 2021
@laeubi
Copy link
Contributor

laeubi commented Apr 28, 2021

Debugging will be reworked in 2.x providing an example that fails would help us to verify/develop/improve this feature,

@laeubi laeubi added the v1.x label Sep 14, 2021
@laeubi
Copy link
Contributor

laeubi commented Sep 14, 2021

We are currently developing a new version of the cucumber-plugin with improved support for more recent cucumber versions, if you like try out the following update-site (please uninstall the old plugin before):
https://cucumber.github.io/cucumber-eclipse/update-site/main/

There will be no more work on this for v1.x unless someone opens a PR to fix this.

@laeubi laeubi closed this as completed Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests