Closed
Description
Scenario
I as a Node developer use the integrated terminal to launch my Node.js app as I'm used to. My app starts, and now I want to debug. I could make a debug configuration to launch my Node app via VS Code, but that would be a new workflow for me. Instead I want VS code to be able to attach to my started Node process from the terminal.
Proposal
We should explore auto attaching to our Node debugger to the first Node process started from the integrated terminal.
Flow:
- User starts process from integrated terminal. Ex
npm start
- User press F5
- We auto detect the Node process started from the integrated terminal
- Attach to that specific pID via our existing attach/pickProcess configuration.
This could either happen automatically as a part of our magic out of box experience, or through a new property in the debug configuration.
{
"type": "node",
"request": "attach",
"name": "Launch Program",
"attachToIntegratedTerminal: true
}
Rationale
- Encourage more users to use the integrated terminal.
- Leverage the benefits that we know which Node processes that were started from VS Code.
- Provide a end-to-end scenario without forcing developers to change their workflow by having them adapting launching from VS Code.