This could, probably, regarded as a feature wish. However, it may be rather important (see below).
Given the following launch configuration.
{
"console": "integratedTerminal",
"disableOptimisticBPs": true,
"envFile": "${workspaceFolder}/.vscode/.env",
"name": "Debug",
"request": "launch",
"stopOnEntry": true,
"program": "${workspaceFolder}/server/startup",
"skipFiles": ["<node_internals>/**/*.js"],
"type": "node"
}
I'm working on Windows with Cmd or Powershell terminal.
The old debugger starts the project like
cd <path to workspace> && cmd /C "<set environment variables>" && <path to node.exe> server\startup.js "
ie, it makes a relative path from the "program" setting (which is and must be absolute).
With the new debugger, however, in the last part, it uses the absolute path:
... && <path to node.exe> <path to workspace>\server\startup "
Unfortunately, <path to workspace> is built with a lower case drive letter. This may lead to problems, when node uses require to load modules, which seems to use uppercase drive letters. graphql, for instance, may refuse to run because it supposes there are two different instances (lower case and upper case drive letter).
So it looks like there is a "simple" solution, when the project is called with a relative path like it is with the older debugger.
This could, probably, regarded as a feature wish. However, it may be rather important (see below).
Given the following launch configuration.
I'm working on Windows with Cmd or Powershell terminal.
The old debugger starts the project like
cd <path to workspace> && cmd /C "<set environment variables>" && <path to node.exe> server\startup.js "ie, it makes a relative path from the "program" setting (which is and must be absolute).
With the new debugger, however, in the last part, it uses the absolute path:
... && <path to node.exe> <path to workspace>\server\startup "Unfortunately,
<path to workspace>is built with a lower case drive letter. This may lead to problems, when node usesrequireto load modules, which seems to use uppercase drive letters. graphql, for instance, may refuse to run because it supposes there are two different instances (lower case and upper case drive letter).So it looks like there is a "simple" solution, when the project is called with a relative path like it is with the older debugger.