Trying to debug Python program when using option "Python Debugger: Debug using launch.json" there is an execution error (see screenshot)
Steps to reproduce:
Python 3.8 installed for all users in Windows (C:\Program Files\Python38\python.exe).
When debugging using "Python Debugger: Debug Python file" option, the debugger starts perfectly and without errors. Executing string is:
c:; cd 'c:\Temp\FR'; & 'c:\Program Files\Python38\python.exe' 'c:\Users\mmiller.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher64\bundled\libs\debugpy\adapter/../..\debugpy\launcher' '61954' '--' 'C:\Temp\FR\CallFlexResponse.py'
When trying to debug using "Python Debugger: Debug using launch.json" there are execution errors because strings to execute are not surrounded by single quotes, and file path contains spaces. Executing string is:
Behaviour
Expected vs. Actual
Trying to debug Python program when using option "Python Debugger: Debug using launch.json" there is an execution error (see screenshot)
Steps to reproduce:
c:; cd 'c:\Temp\FR'; & 'c:\Program Files\Python38\python.exe' 'c:\Users\mmiller.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher64\bundled\libs\debugpy\adapter/../..\debugpy\launcher' '61954' '--' 'C:\Temp\FR\CallFlexResponse.py'
c:; cd 'c:\Temp\FR'; c:\Program Files\Python38\python.exe c:\Users\mmiller.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher 6198ndled\libs\debugpy\adapter/../..\debugpy\launcher 61984 -- C:\Temp\FR.vscode\launch.json myarg
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)``` 2024-03-18 20:48:48.700 [info] DAP Server launched with command: C:\Program Files\Python38\python.exe c:\Users\mmiller\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter ```
User Settings
``` languageServer: "Pylance" ```
Extension version: 2024.2.0 VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z) OS version: Windows_NT x64 10.0.19045 Modes:
System Info
|Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz (1 x 2611)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: disabled_off
opengl: enabled_on
rasterization: unavailable_off
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|4.00GB (0.77GB free)| |Process Argv|| |Screen Reader|no| |VM|100%|
A/B Experiments
``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 vscaac:30438847 c4g48928:30535728 azure-dev_surveyone:30548225 vscrpc:30673769 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:30992800 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfcontrol:30979541 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 dsvsc020:30976470 7ghi1836:30988842 ```