Skip to content

Run without debugging#14351

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

Run without debugging#14351
bobbrow wants to merge 17 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
@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
@sean-mcmanus sean-mcmanus modified the milestones: 1.32, 1.32.0 Apr 4, 2026
@bobbrow
Copy link
Copy Markdown
Member Author

bobbrow commented Apr 6, 2026

@WardenGnaw had some feedback about dealing with some of the other properties in the launch.json config and shared a commit in MIEngine where these things might have been handled. The cases where the config asks for something other than a local launch of a program should be handled in some way (either fail the launch session or fall back to regular debugging mode).

Colengms
Colengms previously approved these changes Apr 7, 2026
Copy link
Copy Markdown
Contributor

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

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

I'm seeing Debug work, but Run not work on mac. I'm still investigating...

Seems like it fails when there's a space in the workspace folder name that has the executable (that case was working earlier).

// Not all terminals support shell integration. If it's not available, we'll just send the command as text though we won't be able to monitor its execution.
if (shellIntegration) {
this.monitorIntegratedTerminal(this.terminal);
if (program.includes(' ')) {
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.

Should you use the same check that VS Code does for the args const wrapInQuotes = !arg.match(/["']/) && arg.match(/\s/); `?

// Not all terminals support shell integration. If it's not available, we'll just send the command as text though we won't be able to monitor its execution.
if (shellIntegration) {
this.monitorIntegratedTerminal(this.terminal);
if (program.includes(' ')) {
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.

I opened a bug against vscode here: microsoft/vscode#308890

If fixed, wrapping in quotes may break in the future.

Copy link
Copy Markdown
Contributor

@sean-mcmanus sean-mcmanus Apr 10, 2026

Choose a reason for hiding this comment

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

@Colengms I assume they would have a similar check for pre-existing quotes that they currently have for pre-existing quotes in args, so it wouldn't break, right?

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.

There is no safe, "it may or may not have shell quoting/escaping" scenario. If they add quotes, it will be double-quoted with the internal quotes considered literal, which would not successfully match the file in the filesystem

Copy link
Copy Markdown
Contributor

@sean-mcmanus sean-mcmanus Apr 10, 2026

Choose a reason for hiding this comment

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

@Colengms But is the quoting that VS Code does for the args okay for the "program"?

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"

5 participants