vscode-js-debug icon indicating copy to clipboard operation
vscode-js-debug copied to clipboard

When using "code" command "auto attach gets destroyed"

Open richtera opened this issue 8 months ago • 0 comments

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:

  1. Go to project
  2. Click on Auto attach
  3. Scroll down to Always
  4. Open new Terminal (the existing terminal will hava a little flag, because the env was not synched)
  5. Execute "code ANOTHERPROJECT"
  6. Do "echo $NODE_OPTIONS" in terminal and you'll see multiple debugger attachments.
  7. 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.

richtera avatar Mar 03 '25 16:03 richtera