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

Stop doesn't kill debugged restart app #19203

Closed
joaomoreno opened this issue Jan 24, 2017 · 2 comments
Closed

Stop doesn't kill debugged restart app #19203

joaomoreno opened this issue Jan 24, 2017 · 2 comments
Assignees
Labels
*as-designed Described behavior is as designed debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@joaomoreno
Copy link
Member

Testing #19040

  1. Create Nodemon debug sample
  2. F5
  3. Hit stop

The terminal will read

[nodemon] app crashed - waiting for file changes before starting...

Which indicates nodemon is still running, when it shouldn't.

The problem aggravates once the user presses F5 again: nothing happens because some input is sent to the Terminal, but it's nodemon and not the shell that handles it. To get out of this state, the user must go to the terminal and Ctrl C.

Also, in that stopped state, a change in the JavaScript file will restart the server, since nodemon is still running.

image

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jan 24, 2017
@weinand
Copy link
Contributor

weinand commented Jan 24, 2017

@joaomoreno VS Code does not try to control (terminate) 'nodemon' because its lifecycle is typically longer than that of the debuggee. So pressing the Terminate button only terminates the debuggee but leaves nodemon alone.

This issue is documented for the 'attach' case here: https://code.visualstudio.com/docs/editor/node-debugging#_attaching-to-nodejs:

Tip: Pressing the Stop button stops the debug session and disconnects from Node.js, but nodemon (and Node.js) will continue to run. To stop nodemon, you will have to kill it from the command line.

We will have to update the doc for the 'launch' case.

@weinand
Copy link
Contributor

weinand commented Feb 23, 2018

IMO the doc explains this case sufficiently.

We cannot improve the implementation (and kill nodemon) because we do not know the process ID of nodemon since it was started from an integrated terminal.

@weinand weinand closed this as completed Feb 23, 2018
@weinand weinand added *as-designed Described behavior is as designed and removed feature-request Request for new features or functionality labels Feb 23, 2018
@weinand weinand modified the milestones: On Deck, February 2018 Feb 23, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

2 participants