Skip to content

Debugging Node + attach to process (PickProcess) not working (wrong debug port) #2063

@jbgraug

Description

@jbgraug

Does this issue occur when all extensions are disabled?: Yes/No
Yes

  • VS Code Version: 1.92.2
  • OS Version: MacOS 14.6.1 (23G93)

Steps to Reproduce:
I'm using node v18.20.3

  1. Create an app.js file with the content setInterval(()=>{console.log('alive')}, 1000)
  2. Start 2 or more node processes with node --inspect=:9223 app.js and --inspect=:9224 app.js`, etc.
  3. Click on Run & debug and select "Attach by process ID" { "name": "Attach by Process ID", "processId": "${command:PickProcess}", "request": "attach", "skipFiles": ["<node_internals>/**"], "type": "node" },
  4. On the "PickProcess" dropdown you should see at least the 2 processes started on step 1)
  5. Pick one of them
    image
  6. Regardless the one wich is picked, the debugger won't be attached (timeout)

The default debug port 9229 seems to be used by vscode for both procesess, wich is not the specified by any of the running node processes.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions