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

Node debugger fails to stop after step over when smartstep is on #37678

Closed
kkeri opened this issue Nov 5, 2017 · 2 comments
Closed

Node debugger fails to stop after step over when smartstep is on #37678

kkeri opened this issue Nov 5, 2017 · 2 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@kkeri
Copy link

kkeri commented Nov 5, 2017

This is a rewording of my previous issue #37670 where I focused on delay, but the real issue is that the debugger fails to stop after a step over command when smartstep is enabled. The failure is not related to code complexity. It occurs when mapped and non-mapped sources play together.

  • Node version: v8.7.0
  • VSCode Version: Code 1.17.2 (b813d12, 2017-10-16T13:59:46.104Z)
  • OS Version: Windows_NT x64 10.0.15063
  • Extensions:
Extension Author (truncated) Version
ohm att 1.0.0
vscode-eslint dba 1.4.2
easy-icons jam 0.3.1
vscode-codemetrics kis 1.10.0
extension-manifest-editor ms- 0.1.5
cpptools ms- 0.14.0
debugger-for-chrome msj 3.5.0

Reproduces without extensions: Yes

Steps to Reproduce:

I created a minimal project and shared it on Github. Please clone it and follow the steps below.

https://github.com/kkeri/vscode-smartstep-issue

  • open the project directory in VS Code
  • execute npm install and npm run build in a terminal window
  • open test/test.js in the editor (which is an unmapped source)
  • set a breakpoint on line 11 (which calls a trivial function in a mapped source)
  • choose the "launch with smartstep" launch configuration
  • start debugging
  • when the debugger stops at the breakpoint, press F10 (step over)

Expected behavior: the debugger stops on line 12.
Actual behavior: the debugger doesn't stop until the program terminates.

When the program is debugged with the "launch without smartstep" configuration though, everything goes well. To reproduce another variation of the issue do the following:

  • set a breakpoint on line 11
  • start debugging
  • when the debugger stops at the breakpoint, start pressing F11 repeatedly.

Edit: the debugger correctly steps into src/mapped.js.
Although at src/mapped.js:3 the debugger will "lose the thread" and run the program until termination.

Edit: fix line numbers

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Nov 5, 2017
@roblourens
Copy link
Member

I think my comment at #37670 (comment) explains this. This just sounds like smartStep working as currently designed.

smartStep is currently less "smart" than it maybe could be. There's a little discussion in microsoft/vscode-chrome-debug-core#245 about it. Maybe it could only step over unmapped lines in files with sourcemaps, or be disabled for a file with a breakpoint, or something else. Maybe that's closer to your expectation.

@kkeri
Copy link
Author

kkeri commented Nov 5, 2017

Thanks for your comments. Yes, they explain what happens and why.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

3 participants