Skip to content

debugger: defer probe pause handling until startup#63608

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-probe-no-column-indent
Open

debugger: defer probe pause handling until startup#63608
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-probe-no-column-indent

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 28, 2026

Fixes a race in debugger probe mode where the startup --inspect-brk
pause could be resumed before probe breakpoints were fully installed.

The generic Debugger.paused handler resumes pauses that do not match a
probe breakpoint. During startup, that can include the initial --inspect-brk pause.
If it is resumed before bindBreakpoints() finishes, a short target script can run
past the probe location and the probe session times out.

This change ignores pause events until probe startup has completed, so the
main setup flow remains responsible for releasing the target after
breakpoints are bound.

Refs: https://github.com/nodejs/node/actions/runs/26482141780/job/77981519238


Assisted-by: openai:gpt-5.5

Keep the initial --inspect-brk pause held until probe breakpoints are
bound and probe mode explicitly releases the target. This prevents the
generic pause handler from resuming user code before probes are ready.

Refs: https://github.com/nodejs/node/actions/runs/26482141780/job/77981519238

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@nodejs-github-bot nodejs-github-bot added debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run. labels May 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.31%. Comparing base (d8ac301) to head (6195187).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63608      +/-   ##
==========================================
- Coverage   90.31%   90.31%   -0.01%     
==========================================
  Files         730      730              
  Lines      234695   234711      +16     
  Branches    43966    43959       -7     
==========================================
+ Hits       211972   211986      +14     
- Misses      14432    14449      +17     
+ Partials     8291     8276      -15     
Files with missing lines Coverage Δ
lib/internal/debugger/inspect_probe.js 79.93% <100.00%> (-0.03%) ⬇️

... and 43 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debugger Issues and PRs related to the debugger subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants