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

[dotnet] clicking on the continue debug is throwing an exception #277

Closed
sswaroopgupta opened this issue Jul 20, 2018 · 4 comments
Closed

Comments

@sswaroopgupta
Copy link
Contributor

sswaroopgupta commented Jul 20, 2018

Expected behavior
Should not get an exception while debugging

Actual behavior
screen shot 2018-07-20 at 2 36 19 pm

Steps to replicate

  • Start debugging
  • Click on pause debug
  • Click on continue debug almost immediately

Getting the above exception

Version

https://bintray.com/gauge/gauge-dotnet/Nightly/0.1.1.nightly-2018-07-19

Blocks #279

@sswaroopgupta
Copy link
Contributor Author

Getting the same exception when the step out button of the debug panel is used

Steps to replicate

  • Create a dotnet project
  • Put a break point at
            var actualCount = CountVowels(word);

line:27 of the StepImplementation.cs

Start Debugging

  • Use the Step in of the debug panel on a function here
  • When the debugger takes you to the first line of the method, Use Step Out function from the panel

This error occurs. When I try to stop debugging getting another exception Debugger adapter terminated unexpectedly

@BugDiver
Copy link
Member

BugDiver commented Aug 8, 2018

This happens because omnisharp debugger for vsocde requires the source code or sourceMap path to be availabe for the external built project.

https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger.md#debugging-code-compiled-on-another-computer

https://github.com/OmniSharp/omnisharp-vscode/wiki/Attaching-to-remote-processes#sourceFileMap

Possible Fix

  1. Do not load the runner symbols. (Not sure how we will do it.)
  2. Mark runner code as DebuggerHidden (we do it still some paths are left.)
  3. Use justMyCode=true in debug config.

I'm not sure if we can do the 3rd option since the user code is loaded by runners code and justMyCode will not recognize it as a user code (Just a theory).

/cc @getgauge/core

@nehashri nehashri added tiage and removed ready labels Aug 8, 2018
@BugDiver BugDiver added ready and removed tiage labels Aug 8, 2018
@BugDiver BugDiver self-assigned this Aug 8, 2018
@BugDiver BugDiver added in progress and removed ready labels Aug 8, 2018
@BugDiver
Copy link
Member

BugDiver commented Aug 8, 2018

Ok, I was wrong using justMyCode solve this problem. The project has to be built in Debug mode then the debugger will just load user code symbols.

BugDiver pushed a commit that referenced this issue Aug 9, 2018
Changed justMyCode flag as true to avoid loading internal dll for debugging.
@BugDiver
Copy link
Member

BugDiver commented Aug 9, 2018

The fix should be available in nightly >=09-08-2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants