Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto attach will not be enabled if there is a space in the storage path and we cannot verify you're using Node 12 #708

Closed
connor4312 opened this issue Aug 18, 2020 · 0 comments

Comments

@connor4312
Copy link
Member

connor4312 commented Aug 18, 2020

This is a documentation issue linked from an error thrown within js-debug

You've landed on this issue because we weren't able to enable auto attach on your machine.

This is because auto attach now works by adding a "bootloader" file that's required in your Node.js scripts. Prior to Node 12, this path did not support spaces (nodejs/node#12971) and would cause any node program to fail if we tried to use them.

Because of the risk of 'breaking' the integrated terminal in this way, js-debug will not enable auto attach if both:

  1. there is a space in the extension storage path (i.e. the location where VS Code is installed);
  2. and we see that the version of node on your path is less than version 12, or we don't find node on your path at all.

There are two things you can do to get around this issue:

  1. Update to a Node version >12
  2. If the error is not correct (which may happen when using .rc-file based version managers like nvm or nvs), you can still enable auto attach by running the command Debug: Force Enable Auto-Attach from the command palette. If this breaks your setup, you can restore your state by setting auto attach to disabled and then reloading the VS Code window.
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant