Conversation
|
@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). |
Extension/test/scenarios/RunWithoutDebugging/tests/runWithoutDebugging.integration.test.ts
Show resolved
Hide resolved
Extension/test/scenarios/RunWithoutDebugging/tests/runWithoutDebugging.integration.test.ts
Outdated
Show resolved
Hide resolved
Extension/test/scenarios/RunWithoutDebugging/tests/runWithoutDebugging.integration.test.ts
Show resolved
Hide resolved
Extension/test/scenarios/RunWithoutDebugging/tests/runWithoutDebugging.integration.test.ts
Show resolved
Hide resolved
| // 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(' ')) { |
There was a problem hiding this comment.
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(' ')) { |
There was a problem hiding this comment.
I opened a bug against vscode here: microsoft/vscode#308890
If fixed, wrapping in quotes may break in the future.
There was a problem hiding this comment.
@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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
@Colengms But is the quoting that VS Code does for the args okay for the "program"?
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