node/lib/internal/debugger
Trivikram Kamat 1f806f2214
debugger: lazily wait for initial break output
Wait for the initial pause render before completing debugger REPL
startup, but only when the initial pause is actually observed during
startup initialization.

Creating the wait promise before Runtime.runIfWaitingForDebugger() can
hang when the debug target exits or disconnects without producing an
initial pause event. It also assumes the inspector object always has
parsed CLI options, which is not true for tests that use a minimal mock
inspector.

Create the initial-render wait lazily from the Debugger.paused handler
while startup initialization is active. This preserves prompt ordering
for normal initial breaks without blocking startup when no initial pause
render occurs.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
PR-URL: https://github.com/nodejs/node/pull/63969
Refs: https://github.com/nodejs/node/actions/runs/27582782593/job/81546582775
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-06-22 05:55:33 +00:00
..
inspect.js debugger: add --max-hit option to probe mode 2026-06-13 20:50:15 +00:00
inspect_client.js debugger: add edit-free runtime expression probes to node inspect 2026-04-19 15:59:10 +00:00
inspect_helpers.js debugger: add --max-hit option to probe mode 2026-06-13 20:50:15 +00:00
inspect_probe.js debugger: defer probe pause handling until startup 2026-06-18 04:24:28 +00:00
inspect_repl.js debugger: lazily wait for initial break output 2026-06-22 05:55:33 +00:00