microsoft / microsoft/vscode-js-debug
When using "code" command "auto attach gets destroyed"
@connor4312 is already working on this.
Since Mar 3, 2025.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 373
- Avg merge
- 1d 9m
- Merged PRs (30d)
- 6
Description
Describe the bug
If you're in an "auto attach" shell, then using the "code" command to open another project will cause
two instances of the --register arg in NODE_OPTIONS
To Reproduce
Steps to reproduce the behavior:
- Go to project
- Click on Auto attach
- Scroll down to Always
- Open new Terminal (the existing terminal will hava a little flag, because the env was not synched)
- Execute "code ANOTHERPROJECT"
- Do "echo $NODE_OPTIONS" in terminal and you'll see multiple debugger attachments.
- Trying to auto attach will end up with a weird error saying it can't find something.
Log File
It's not necessary, it's pretty obvious what's happening, but if you really need it I can see if I can capture it.
VS Code Version:
Version: 1.97.2
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.3.0
Additional context
This was happening every once in a while and I couldn't figure out why. Most of the time I have an open instance of alacritty to launch my new project windows using "code PROJECT" instead of using the terminals within each projects.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.