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

Hang on Remove Breakpoint after program completes #935

Closed
mjbvz opened this issue May 9, 2016 · 1 comment · Fixed by #968
Closed

Hang on Remove Breakpoint after program completes #935

mjbvz opened this issue May 9, 2016 · 1 comment · Fixed by #968
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented May 9, 2016

Repo

  1. Create new empty app with main file with one line:
1. console.log('Hello world!');
  1. Set breakpoint on that line.
  2. Run app
  3. Continue on breakpoint
  4. App stops after at last line of program but is still being debugged.
  5. Click to remove breakpoint on line 1

Expected
Breakpoint is removed

Actual
Infinite hang.

On Node 5.x, this operation is canceled out after a few seconds and we can continue on, but with Node 6.1.0 we hang forever. The hang is on this line: https://github.com/Microsoft/nodejstools/blob/master/Nodejs/Product/Nodejs/Debugger/DebugEngine/AD7BoundBreakpoint.cs#L52

This was referenced May 24, 2016
@mousetraps mousetraps added this to the June milestone May 24, 2016
mjbvz added a commit to mjbvz/nodejstools that referenced this issue May 25, 2016
…ompletion

**Bug**
We currently pause on the last line of a program. Node 6 made some change and now does not respond to debug messages sent after this pause.

**Fix**
This change has two fixes:

* Add an explicit timeout when removing breakpoints. We have an identical timeout when adding breakpoints so it probably makes sense to add this.
* On our low level send calls, register the cancellation token to cancel the promise.

A better fix would be just to never send requests to node after we run to the last line, but it is not clear how we can detect this without a wrapper. The debug protocol does not seem to emit any events about this and the app is offically still running.

closes microsoft#935
@mjbvz mjbvz changed the title Hang on Remove Breakpoint in Node 6.1.0 Hang on Remove Breakpoint after program completes May 25, 2016
@mjbvz
Copy link
Contributor Author

mjbvz commented May 25, 2016

I was mistaken about the Node 6 part, this also repos in Node 5.9 and node 0.12.

Will send out fix that mitigates the problem shortly

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

Successfully merging a pull request may close this issue.

2 participants