I have installed Ubuntu 20.04 on my Windows 10 system. Before I first ran VS Code from within Ubuntu, VS Code worked fine in Windows. Now, I can build my C++ app there, but cannot debug it. I get an alert box saying "Cannot find runtime 'node' on PATH. Is 'node' installed?"
Whenever I start VS Code, a background process called 'node' also starts, so I presume VS Code starts it. My Ubuntu installation has about eight versions of node.js in various subdirectories of ~/.vscode-server.
Here is my launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/gametest",
"skipFiles": [
"<node_internals>/**"
]
},
]
}
I tried installing the newest nodejs. I no longer get the alert box with the not found message, but the debug console in VS Code now shows:
/usr/bin/node /home/jon/projects/KSolve/gametest
Debugger listening on ws://127..... (can't copy from debug console window)
For help, ...
/home/jon/projects/KSolve/gametest:1
ELF(three squares)
^
SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
...
...
Process exited with code 1