Skip to content

--inspect race condition #25215

Closed
Closed
@canonic-epicure

Description

@canonic-epicure

The activation of the --inspect cmd option is subject to race condition. To reproduce:

  1. 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)
  1. Launch it first with:
    node --inspect-brk debugger.js
    to open the Inspector window in the Chrome dev tools

  2. Then launch it several times with:
    node --inspect debugger.js

  3. Observe most of the times ALL breakpoints are ignored, sometimes ALL are activated, sometimes only the one with 300ms delay.

  4. Expected behavior - all breakpoints are expected to always be honored, including the very 1st one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.inspectorIssues and PRs related to the V8 inspector protocolstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions