Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Debugger can't terminate on program end #11

Closed

Description

@roblourens

Currently, when the script terminates and a debugger is attached, Node waits for the debugger to detach before quittting, but the debugger has no way to know. I think a result of nodejs/node#7088

Already tracked in - nodejs/node#7742

Activity

  1. added and removed on Sep 7, 2016
  2. roblourens commented on Sep 7, 2016

    @roblourens
    MemberAuthor

    Node in some versions has a similar issue, so this probably isn't high priority.

  3. roblourens commented on Sep 21, 2016

    @roblourens
    MemberAuthor

    I could listen on stderr for "Waiting for the debugger to disconnect..." but not a good solution

  4. mousetraps commented on Sep 27, 2016

    @mousetraps

    Interestingly, after hitting this issue, I pressed step over a gazillion times, and the process actually exited at the end.

  5. rianadon commented on Jun 19, 2017

    @rianadon
    Contributor

    Now that nodejs/node#7742 has been resolved, what needs to be done to fix this?

    I'd be happy to provide a PR but given that the bulk of functionality comes from vscode-chrome-debug-core, I'm not sure where to fix this.

  6. roblourens commented on Jun 19, 2017

    @roblourens
    MemberAuthor

    Thanks for pointing that out, I should have subscribed to the issue. A PR would be awesome, it should be fairly simple. The fix will be in this repo, at least for now.

    Override protected hookConnectionEvents(): void { from -core's ChromeDebugAdapter. Add a listener for the Runtime.executionContextDestroyed event. Check that the id=1 (I don't know what else in node would cause a context to be created and destroyed? And call terminateSession when that happens.

  7. added a commit that references this issue on Jun 19, 2017
    8f2d82a
  8. rianadon commented on Jun 19, 2017

    @rianadon
    Contributor

    Thanks for all those instructions! If you haven't already seen it the PR is #112.

  9. added a commit that references this issue on Jul 20, 2017
    26d32f3
  10. locked and limited conversation to collaborators on Mar 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions