Skip to content

debugger: wait for initial break output#63969

Draft
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-run-after-quit-restart-3
Draft

debugger: wait for initial break output#63969
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-run-after-quit-restart-3

Conversation

@trivikr

@trivikr trivikr commented Jun 18, 2026

Copy link
Copy Markdown
Member

Fix a flaky test-debugger-run-after-quit-restart failure where the debugger
REPL could display debug> before the initial break output had been rendered.

The startup path now waits for the first local --inspect-brk pause render to
finish before completing REPL startup. Remote attach and
NODE_INSPECT_RESUME_ON_START=1 continue to skip that wait.

Refs:

Error Log
=== release test-debugger-run-after-quit-restart ===
Path: parallel/test-debugger-run-after-quit-restart
Error: --- stderr ---
/Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/common/debugger.js:92
        const timeoutErr = new Error(`Timeout (${TIMEOUT}) while waiting for ${pattern}`);
                           ^

Error: Timeout (15000) while waiting for /break (?:on start )?in/i
    at /Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/common/debugger.js:92:28
    at new Promise (<anonymous>)
    at Object.waitFor (/Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/common/debugger.js:67:14)
    at Object.waitForInitialBreak (/Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/common/debugger.js:116:18)
    at Object.<anonymous> (/Users/runner/work/node/node/dir%20with $unusual"chars?'åß∂ƒ©∆¬…`/test/parallel/test-debugger-run-after-quit-restart.js:18:7)
    at Module._compile (node:internal/modules/cjs/loader:1947:14)
    at Object..js (node:internal/modules/cjs/loader:2087:10)
    at Module.load (node:internal/modules/cjs/loader:1669:32)
    at Module._load (node:internal/modules/cjs/loader:1450:12)
    at wrapModuleLoad (node:internal/modules/cjs/loader:260:19) {
  output: '< Debugger listening on ws://127.0.0.1:62970/019e6944-4d82-44b5-956b-e4505af5b290\n' +
    '< For help, see: https://nodejs.org/learn/getting-started/debugging\n' +
    '< \n' +
    '\n' +
    '\n' +
    'connecting to 127.0.0.1:62970 ...\n' +
    '< Debugger attached.\n' +
    '< \n' +
    '\n' +
    ' ok\n' +
    '\n' +
    'debug> '
}

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 Jun 18, 2026
@trivikr trivikr added request-ci Add this label to start a Jenkins CI on a PR. flaky-test Issues and PRs related to the tests with unstable failures on the CI. labels Jun 18, 2026
Wait for the initial pause render before completing debugger REPL
startup. This prevents the prompt from being displayed before the
initial break location has been printed.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@trivikr trivikr force-pushed the test-debugger-run-after-quit-restart-3 branch from 5f512d0 to 77d19fe Compare June 18, 2026 04:27
@trivikr

trivikr commented Jun 18, 2026

Copy link
Copy Markdown
Member Author

Marked as draft as there are many CI to failures.

@trivikr trivikr marked this pull request as draft June 18, 2026 16:41
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. flaky-test Issues and PRs related to the tests with unstable failures on the CI. 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