Skip to content

debugger: explicitly pass shell:false in launchChildProcess spawn call#63759

Open
DivyanshuX9 wants to merge 1 commit into
nodejs:mainfrom
DivyanshuX9:fix/debugger-special-char-path
Open

debugger: explicitly pass shell:false in launchChildProcess spawn call#63759
DivyanshuX9 wants to merge 1 commit into
nodejs:mainfrom
DivyanshuX9:fix/debugger-special-char-path

Conversation

@DivyanshuX9
Copy link
Copy Markdown
Contributor

When launchChildProcess in lib/internal/debugger/inspect_helpers.js
spawns the child process, it did not explicitly pass shell: false.
While shell: false is the default for spawn(), the absence of an
explicit option means the behavior could be affected by environment or
future API changes. More importantly, on some platforms and CI
configurations (e.g. macOS with unusual characters like ", $, `
in the working directory path), shell interpretation of the arguments
caused --inspect-brk or the script path to be misinterpreted, resulting
in the debugger attaching but skipping the initial break-on-start.

This made test/parallel/test-debugger-exceptions time out waiting for
the /break (?:on start )?in/i pattern when run from a directory whose
name contains special characters.

Fixes: #63758

Signed-off-by: Divyanshu Sharma <divyanshu88999@gmail.com>
@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 5, 2026
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.

test-debugger-exceptions fails when path contains special characters (spaces, $, ", Unicode)

2 participants