Closed
Description
- Version: v8.14.0
- Platform: Linux outpost 3.13.0-100-generic Support io.js Dockerfile or Docker Repo #147-Ubuntu SMP Tue Oct 18 16:48:51 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
n - Subsystem: Inspector
The activation of the --inspect
cmd option is subject to race condition. To reproduce:
- Create a file, called
debugger.js
with the content:
debugger
setTimeout(() => { debugger }, 10)
setTimeout(() => { debugger }, 50)
setTimeout(() => { debugger }, 100)
setTimeout(() => { debugger }, 200)
setTimeout(() => { debugger }, 300)
-
Launch it first with:
node --inspect-brk debugger.js
to open the Inspector window in the Chrome dev tools -
Then launch it several times with:
node --inspect debugger.js
-
Observe most of the times ALL breakpoints are ignored, sometimes ALL are activated, sometimes only the one with 300ms delay.
-
Expected behavior - all breakpoints are expected to always be honored, including the very 1st one.