- VSCode Version: 1.43.2
- OS Version: Linux x64 5.3.0-45-generic
- Node.js Version: >=12.16.0
Steps to Reproduce:
- Configure launch json
skipFiles variable to <node_internals>/**/*.js to prevent skipping /<eval>/VM* files debugging.
Here is my launch.json file:
{
// 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",
"skipFiles": ["<node_internals>/**/*.js"],
"program": "${workspaceFolder}/index.js"
}
]
}
- Create an index.js
const code = ` console.log(arg1);
const a = arg1 + 1;
console.log(a);
return a;`;
const fn = new Function('arg1', code);
console.log(process.version);
const result = fn(1);
console.log('result', result);
- Set breakpoint on row 8 -
const result = fn(1);
- Hit
F11 to start debugging evaluated fn
- Use
F10 to debug each row in fn code
Till Node.js 12.15.0 debugger marks the right row.
From Node.js 12.16.0 debugger marks a row but it already executed row+1 and it is on row+2
How it works well with Node 12.15.0

How it shows wrong current row with Node 12.16.0

When Debugger stops on row 3 - const a is not yet declared (row 4) but in fact debugger already executed row 4 and it is currently on row 5
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
skipFilesvariable to<node_internals>/**/*.jsto prevent skipping/<eval>/VM*files debugging.Here is my
launch.jsonfile:const result = fn(1);F11to start debugging evaluatedfnF10to debug each row infncodeTill Node.js 12.15.0 debugger marks the right row.
From Node.js 12.16.0 debugger marks a row but it already executed row+1 and it is on row+2
How it works well with Node 12.15.0

How it shows wrong current row with Node 12.16.0

When Debugger stops on row 3 -
const ais not yet declared (row 4) but in fact debugger already executed row 4 and it is currently on row 5Does this issue occur when all extensions are disabled?: Yes