Skip to content

Auto attach debugger to Node processes started from integrated terminalย #42521

Closed
@auchenberg

Description

@auchenberg

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:

  1. User starts process from integrated terminal. Ex npm start
  2. User press F5
  3. We auto detect the Node process started from the integrated terminal
  4. 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.

Metadata

Metadata

Assignees

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityon-testplan

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions