Skip to content

debugger: avoid probe timeouts on target throws#63632

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-probe-script-throws
Open

debugger: avoid probe timeouts on target throws#63632
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-probe-script-throws

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 29, 2026

Fixes a flaky test-debugger-probe-script-throws timeout.

Probe mode now explicitly disables exception pauses after enabling the
debugger. This keeps uncaught target exceptions flowing to process exit,
so probe mode reports probe_target_exit instead of leaving the target
paused until the probe timeout.

Refs: https://github.com/nodejs/node/actions/runs/26599014755/job/78377475548

Error Log
Path: parallel/test-debugger-probe-script-throws
Error: --- stderr ---
[process 39453]: --- stderr ---

[process 39453]: --- stdout ---
{"v":2,"probes":[{"expr":"'before-throw'","target":{"suffix":"probe-script-throws.js","line":7}},{"expr":"99","target":{"suffix":"probe-script-throws.js","line":4}}],"results":[{"event":"timeout","pending":[0,1],"error":{"code":"probe_timeout","message":"Timed out after 30000ms waiting for probes: probe-script-throws.js:7, probe-script-throws.js:4"}}]}

[process 39453]: status = 1, signal = null
/Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/common/child_process.js:112
    throw error;
    ^

Error: - process terminated with status 1, expected 0
    at Object.<anonymous> (/Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/parallel/test-debugger-probe-script-throws.js:31:1)
    at Module._compile (node:internal/modules/cjs/loader:1879:14)
    at Object..js (node:internal/modules/cjs/loader:2019:10)
    at Module.load (node:internal/modules/cjs/loader:1602:32)
    at Module._load (node:internal/modules/cjs/loader:1404:12)
    at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
    at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
    at node:internal/main/run_main_module:33:47 {
  options: {
    cwd: '/Users/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/test/fixtures/debugger'
  },
  command: '/Users/runner/work/node/node/dir%20with $unusual"chars?\'åß∂ƒ©∆¬…`/out/Release/node inspect --json --probe probe-script-throws.js:7 --expr \'before-throw\' --probe probe-script-throws.js:4 --expr 99 probe-script-throws.js'
}

Assisted-by: openai:gpt-5.5

Probe mode expects uncaught target exceptions to end the debuggee and
emit probe_target_exit. Disable exception pauses during probe setup so
the target can exit instead of remaining paused until the timeout.

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 29, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label May 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.28%. Comparing base (e1ae3a5) to head (35cdb9d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63632      +/-   ##
==========================================
- Coverage   90.29%   90.28%   -0.02%     
==========================================
  Files         730      730              
  Lines      234816   234817       +1     
  Branches    43955    43958       +3     
==========================================
- Hits       212034   211999      -35     
- Misses      14492    14537      +45     
+ Partials     8290     8281       -9     
Files with missing lines Coverage Δ
lib/internal/debugger/inspect_probe.js 79.47% <100.00%> (-0.09%) ⬇️

... and 34 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. request-ci Add this label to start a Jenkins CI on a PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants