-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
*duplicateIssue identified as a duplicate of another issue(s)Issue identified as a duplicate of another issue(s)debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issues
Description
- VSCode Version:: 1.47.3 (user setup)
- OS Version: Windows_NT x64 10.0.18363
Commit: 91899dc
Date: 2020-07-23T13:12:49.994Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
Steps to Reproduce:
- create source code test.js as below
function foo(x){
let arr = []
for (let i = 0 ; i < x.length; i++) {
arr.push(x[i])
console.log(i, x[i], arr)
}
}
foo([1, 2, 3])
console.log("done")
- change the launch.json as below
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Current Program",
"program": "${file}",
"request": "launch",
"type": "node"
}
]
}
- press F5 and run multiple times, the output could be one of :
D:\Dev\nodejs\node.exe d:\workspace\javascript\test.js
Debugger listening on ws://127.0.0.1:51591/b171a1ab-295b-4dde-b888-5fc5d7d57997
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
Process exited with code 0
0 1 (1) [1]
1 2 (2) [1, 2]
done
or
D:\Dev\nodejs\node.exe d:\workspace\javascript\test.js
Debugger listening on ws://127.0.0.1:51718/ca444f52-20f3-4345-9185-e36205b8a1ae
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
Process exited with code 0
0 1 (1) [1]
done
but if I set a breakpoint at last line and debug it, then the output would be right
D:\Dev\nodejs\node.exe d:\workspace\javascript\test.js
Debugger listening on ws://127.0.0.1:51781/09bdb609-16c1-41b8-a158-770b42e060a3
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
0 1 (1) [1]
1 2 (2) [1, 2]
2 3 (3) [1, 2, 3]
done
Waiting for the debugger to disconnect...
Process exited with code 0
Does this issue occur when all extensions are disabled?: Yes
Metadata
Metadata
Assignees
Labels
*duplicateIssue identified as a duplicate of another issue(s)Issue identified as a duplicate of another issue(s)debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issues