-
Notifications
You must be signed in to change notification settings - Fork 36.4k
Closed
Labels
debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-linkedThis is an upstream issue that has been reported upstreamThis is an upstream issue that has been reported upstream
Description
- 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
skipFilesvariable to<node_internals>/**/*.jsto prevent skipping/<eval>/VM*files debugging.
Here is mylaunch.jsonfile:
{
// 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
F11to start debugging evaluatedfn - Use
F10to debug each row infncode
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
Metadata
Metadata
Assignees
Labels
debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)Issue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-linkedThis is an upstream issue that has been reported upstreamThis is an upstream issue that has been reported upstream