Skip to content

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

Description

@connor4312

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions