Skip to content

Fix arq quoting to work in runInTerminal#1981

Merged
rchiodo merged 8 commits into
microsoft:mainfrom
rchiodo:rchiodo/fixArgQuoting
Dec 10, 2025
Merged

Fix arq quoting to work in runInTerminal#1981
rchiodo merged 8 commits into
microsoft:mainfrom
rchiodo:rchiodo/fixArgQuoting

Conversation

@rchiodo

@rchiodo rchiodo commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

runInTerminal has a special mode 'argsCanBeInterpretedByShell' that is set when extra arguments are being passed to the python script.

This mode causes VS code to run the arguments in the runInTerminal request literally. Normally it quotes the arguments, but in this mode it just runs them as is.

This causes #1980 because spaces are not quoted.

A related PR was submitted to the debugger extension: microsoft/vscode-python-debugger#886. That PR will add the terminalQuoteCharacter that this PR is using to try and set the quote to use around arguments.

Fixes #1980

@rchiodo rchiodo requested a review from a team as a code owner December 9, 2025 17:37
@rchiodo

rchiodo commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rchiodo rchiodo requested a review from eleanorjboyd December 9, 2025 17:44
@rchiodo

rchiodo commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rchiodo rchiodo merged commit e5017d7 into microsoft:main Dec 10, 2025
23 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot debug with cmdline args if python.exe in 'c:\Program Files'

4 participants