Vscode-js-debug: `workspaceFolder` causes error in multi-root workspace configuration

Created on 13 Jun 2020  路  4Comments  路  Source: microsoft/vscode-js-debug

When attempting to run a debug task that makes use of the workspaceFolder variable, I receive the following error message:

Code_2020-06-13_07-49-20

This error should not be thrown, because I am already using a scoped workspaceFolder variable, as shown in the configurations.Debug.cwd parameter of my configuration below.
 


 
With {"debug.javascript.usePreview": true}, my Chrome task works, but my Debug task throws the error shown above.

With {"debug.javascript.usePreview": false}, my Debug task works, but my Chrome task exhibits the issues described in #516.
 


 

Workspace Configuration

"launch": {
  "version": "0.2.0",
  "configurations": [

    {
      "name":"Debug", "type":"node", "request":"launch",

      "cwd":                    "${workspaceFolder:Root}",
      "outputCapture":          "std",
      "internalConsoleOptions": "openOnSessionStart",

      "runtimeArgs": [
        "--nolazy",
        "--inspect",
        "--require", "ts-node/register",
      ],
      "args": [
        "./__Source__/__Debug__.ts",
      ],
      "skipFiles": [
        "<node_internals>/**/*.js",
        "**/node_modules/**/*",
      ],
    },

    {
      "name":"Chrome", "type":"chrome", "request":"launch",

      "url":                    "http://localhost:8080",
      "internalConsoleOptions": "openOnSessionStart",
    },

  ],
},
bug verified

All 4 comments

Thanks for the good issue!

@connor4312

Is the fix live? Just tried on version 2020.8.517 and am still experiencing the issue.

Please set your type to pwa-node

@connor4312

That worked, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

roblourens picture roblourens  路  5Comments

connor4312 picture connor4312  路  4Comments

Agamennon picture Agamennon  路  4Comments

KieranHarper picture KieranHarper  路  5Comments

roblourens picture roblourens  路  7Comments