I have simple test code in node.js which i run in vscode on windows 10.
I put a breakpoint on the first line of code.
let x = 'hello world'
console.log(x)
my launch.json configuations are as follows.
"version": "0.2.0",
"configurations": [
// nodes
{
"type": "node",
"request": "launch",
"name": "node: Launch Program",
"program": "${file}",
"console": "integratedTerminal",
},
{
"type": "node",
"request": "launch",
"name": "node: Launch Program (External Terminal)",
"program": "${file}",
"console": "externalTerminal"
}
]
The code runs in the integrated terminal and also the external terminal, but does not stop at the breakpoint if i were to set one.
This is what i see in the integrated terminal:
C:\Users\Owner\Dropbox\programming\javascript> cd c:\Users\Owner\Dropbox\programming\javascript && cmd /C "set "NODE_OPTIONS=--require C:\Users\Owner\AppData\Local\Temp\vscode-js-debug-bootloader.js" && set "VSCODE_INSPECTOR_OPTIONS={"inspectorIpc":"\\\\.\\pipe\\node-cdp.24028-42.sock","deferredMode":false,"waitForDebugger":"","execPath":"C:\\Program Files\\nodejs\\node.exe","onlyEntrypoint":false,"autoAttachMode":"always","fileCallback":"C:\\Users\\Owner\\AppData\\Local\\Temp\\node-debug-callback-101745418fdd2bc6"}" && "C:\Program Files\nodejs\node.exe" .\test.js "
Debugger listening on ws://127.0.0.1:52096/7c733fea-7053-4446-8901-4220611d16ad
For help see https://nodejs.org/en/docs/inspector
hello world
I have tried all kinds of configurations, but none seem to work. I must presume that i have not invoked the debugger. What i do know is that the debugger is invoked for python when doing similar.
How can i get the code to stop at the breakpoint please ?