You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add optional injectRuntimeArgs flag to safely pass runtime args when interpreter path contains spaces #25539
When using the Python debugger in VS Code, if the Python interpreter path contains spaces (e.g., under macOS iCloud paths), passing runtime arguments dynamically (via the debug toolbar or tasks) causes the debugger launch to fail: e.g.: env: /Volumes/.../Daemon: No such file or directory
Launching with no arguments works.
Static "args" in launch.json works.
Dynamic runtime args break due to /usr/bin/env splitting the interpreter path at spaces.
Proposed enhancement
Add an optional boolean flag in launch.json:
"injectRuntimeArgs": true
Behavior:
Default (false) → current deterministic behavior.
true → any runtime arguments passed from the debug toolbar, command palette, or tasks are automatically appended (or optionally replace) the "args" array at launch.
Uses VS Code’s list-based launch to avoid shell splitting issues.
Benefits
Avoids /usr/bin/env path splitting bug for spaces in interpreter or program paths.
Runtime arguments behave exactly like static "args".
Default behavior remains unchanged.
Works with multi-root workspaces and tasks.
Optional Enhancement
Optionally allow a mode to control whether runtime args append or replace:
"injectRuntimeArgsMode": "append" | "replace"
changed the title [-]Auto-injecting args into launch.json would break repeatability and multi-root workspaces — the debug configuration is supposed to be deterministic.[/-][+]Add optional injectRuntimeArgs flag to safely pass runtime args when interpreter path contains spaces[/+]on Oct 22, 2025
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.
Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue. PRs are welcome so you can create a PR that fixes this if you are passionate about getting this feature across the finish line. Thanks!
Activity
[-]Auto-injecting args into launch.json would break repeatability and multi-root workspaces — the debug configuration is supposed to be deterministic.[/-][+]Add optional injectRuntimeArgs flag to safely pass runtime args when interpreter path contains spaces[/+]github-actions commentedon Oct 23, 2025
Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.
eleanorjboyd commentedon Dec 8, 2025
Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue. PRs are welcome so you can create a PR that fixes this if you are passionate about getting this feature across the finish line. Thanks!