Skip to content

test: remove obsolete debugger pre-break handling#64185

Open
inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:debugger-remove-isprebreak
Open

test: remove obsolete debugger pre-break handling#64185
inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:debugger-remove-isprebreak

Conversation

@inoway46

@inoway46 inoway46 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

isPreBreak was a compatibility branch for the old node-inspect-era CommonJS wrapper display.

In the current default CommonJS loading path, lib/internal/modules/cjs/loader.js uses compileFunctionForCJSLoader to compile the original file source directly, so the initial break is shown at the user code line, e.g. > 1 const x = 10;.

const result = compileFunctionForCJSLoader(content, filename, false /* is_sea_main */, shouldDetectModule);

As a result, the branch that detects 1 (function (exports and sends next is not reached by the normal debugger tests and has become unnecessary legacy compatibility code.

This also removes the old optional wrapper pattern from the test-debugger-break.js expectation.

Background

While investigating flakes around waitForInitialBreak(), this branch stood out as unused in the current default path so this PR removes it.

Signed-off-by: inoway46 <inoueyuya416@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 28, 2026
@inoway46 inoway46 marked this pull request as ready for review June 28, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants