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
When the path to the python.exe contains spaces (e. g. c:\Program Files\Python311\python.exe), debugging with arguments is not possible.
The terminal shows the following:
PS C:\Data\Temp\py> c:\Program Files\Python311\python.exe c:\Users\SebastianF\.vscode\extensions\ms-python.debugpy-2024.4.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher 53374 -- C:\Data\Temp\py\script.py aaa
c:\Program: The term 'c:\Program' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
After a few seconds, an error dialog "Timed out waiting for launcher to connect" appears.
Depending on the path, a workaround can be used by specifying a path with shortened names, e.g. c:\Progra~1\Python311\python.exe. This is not easily discoverable.
Steps to reproduce:
Precondition: In the settings, the python default interpreter path contains spaces.
Create a .py file and type some code
Press F5
Select "Python Debugger"
Select "Python File with Arguments"
Type some command line arguments and confirm
Diagnostic data
launch.json configuration
Not tested with launch.json.
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
2024-04-11 14:13:27.381 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-04-11 14:13:27.381 [info] Experiment 'pythonREPLSmartSend' is active
2024-04-11 14:13:27.381 [info] Experiment 'pythonSurveyNotification' is active
2024-04-11 14:13:27.381 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-04-11 14:13:27.382 [info] Experiment 'pythonTestAdapter' is active
2024-04-11 14:13:27.382 [info] Default formatter is set to null for workspace c:\Repos\VEcuGenCLI
2024-04-11 14:13:27.382 [info] Test server listening.
2024-04-11 14:13:27.382 [info] Python interpreter path: C:\Program Files\Python311\python.exe
2024-04-11 14:13:28.475 [info] > pyenv which python
2024-04-11 14:13:28.475 [info] cwd: .
2024-04-11 14:13:33.514 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-04-11 14:13:33.515 [info] Experiment 'pythonREPLSmartSend' is active
2024-04-11 14:13:33.515 [info] Experiment 'pythonSurveyNotification' is active
2024-04-11 14:13:33.515 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-04-11 14:13:33.515 [info] Experiment 'pythonTestAdapter' is active
2024-04-11 14:13:33.515 [info] Default formatter is set to null for workspace c:\Data\Temp\py
2024-04-11 14:13:33.515 [info] Test server listening.
2024-04-11 14:13:33.516 [info] Python interpreter path: C:\Program Files\Python311\python.exe
2024-04-11 14:13:33.641 [info] > pyenv which python
2024-04-11 14:13:33.641 [info] cwd: .
2024-04-11 14:13:35.744 [info] Shell integration status changed, can confirm it's working.
2024-04-11 14:13:36.273 [info] Starting Pylance language server.
2024-04-11 14:17:15.687 [info] Send text to terminal: c:\Program Files\Python311\python.exe c:\Users\SebastianF\.vscode\extensions\ms-python.debugpy-2024.4.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher 53374 -- C:\Data\Temp\py\script.py aaa
Output for Python Debugger in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python Debugger)
This is the launch.json that got created in the process:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File with Arguments",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"args": "${command:pickArgs}"
}
]
}
Type: Bug
Behaviour
When the path to the python.exe contains spaces (e. g.
c:\Program Files\Python311\python.exe
), debugging with arguments is not possible.The terminal shows the following:
After a few seconds, an error dialog "Timed out waiting for launcher to connect" appears.
Depending on the path, a workaround can be used by specifying a path with shortened names, e.g.
c:\Progra~1\Python311\python.exe
. This is not easily discoverable.Steps to reproduce:
Precondition: In the settings, the python default interpreter path contains spaces.
Diagnostic data
launch.json
configurationOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output for
Python Debugger
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython Debugger
)Extension version: 2024.4.0
VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:26:18.741Z)
OS version: Windows_NT x64 10.0.22621
Modes:
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: