Fixing issues with debugger from VS Studio where after a few nested calls to features on other folders the debugger didn't stop on the breakpoint #1437
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This was a painful one for me and I just stumbled upon the solution by change. When your feature files call other feature files the debugger was never great and most of the times didn't stop (especially if they were on other sub folders etc). It has always been painful for UI automation as we reuse a lot of features and functions etc.
The problem was that the path of the breakpoint was on this format: C:\test\feature\folder..\called-feature.feature and the breakpoints are all stored with absolute paths - C:\test\feature\folder\called-feature.feature . Paths.normalize() takes care of that. In addition VS Studio some times passes the path with the driver letter in lower case (e.g. c:\test\feature\folder\called-feature.feature) and so the lookup in the Map also fails.
Case is important because of the BREAKPOINTS.get(). I wondered for a few minutes if we should make it insensitive but that can create problems in Mac/Linux (although why would you have the same file with two different cases in the same folder).