Skip to content

Run without debugging#14351

Open
bobbrow wants to merge 8 commits intomainfrom
bobbrow/runWithoutDebugging
Open

Run without debugging#14351
bobbrow wants to merge 8 commits intomainfrom
bobbrow/runWithoutDebugging

Conversation

@bobbrow
Copy link
Copy Markdown
Member

@bobbrow bobbrow commented Apr 3, 2026

Fixes: #1201

Supports both the Play button in the editor (run active file) and configurations specified in launch.json. macOS support needs to be tested - I don't currently have access to a machine.

Co-authored by GitHub Copilot

@github-project-automation github-project-automation bot moved this to Pull Request in cpptools Apr 3, 2026
if (platform === 'win32') {
cp.spawn('cmd.exe', ['/c', 'start', 'cmd.exe', '/K', cmdLine], { cwd, env, detached: true, stdio: 'ignore' }).unref();
} else if (platform === 'darwin') {
cp.spawn('osascript', ['-e', `tell application "Terminal" to do script "${this.escapeQuotes(cmdLine)}"`], { cwd, env, detached: true, stdio: 'ignore' }).unref();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be tested.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobbrow I've tested this code path on mac (it worked).

Copy link
Copy Markdown
Member Author

@bobbrow bobbrow Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sean-mcmanus cool! Does it work for paths with spaces and args with spaces too?

Copy link
Copy Markdown
Contributor

@sean-mcmanus sean-mcmanus Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobbrow Yeah, it works with folders/files with spaces in the path, but what do you mean by "args with spaces"? i.e. I see the args be an array of strings. Do you mean like [ "one two", "three four" ]?

@bobbrow bobbrow marked this pull request as ready for review April 4, 2026 00:05
@bobbrow bobbrow requested a review from a team as a code owner April 4, 2026 00:05
@bobbrow bobbrow added this to the 1.32 milestone Apr 4, 2026
"cwd": "$\{fileDirname\}",
"environment": [],
${ type === "cppdbg" ? `"externalConsole": false` : `"console": "externalTerminal"` }
${ type === "cppdbg" ? `"externalConsole": false` : `"console": "integratedTerminal"` }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this changing?

Telemetry.logDebuggerEvent(DebuggerEvent.debugPanel, { "debugType": DebugType.debug, "configSource": folder ? ConfigSource.workspaceFolder : ConfigSource.singleFile, "configMode": ConfigMode.noLaunchConfig, "cancelled": "true", "succeeded": "true" });
return undefined; // aborts debugging silently
} else {
const noDebug = config.noDebug ?? false; // preserve the noDebug value from the config if it exists.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments ends with a period but doesn't start with a capital letter (versus the case on the next line).

@sean-mcmanus sean-mcmanus modified the milestones: 1.32, 1.32.0 Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

Support "Run without debugging"

3 participants