microsoft / microsoft/vscode-python-debugger

Running debug with JSON script causes an error

未關閉
#888 1 則留言 0 個 reaction 已指派 2 人 在 GitHub 檢視

還沒有人認領這個 Issue。

triage-needed
主要語言
TypeScript
星號
181
分支
126
平均合併
2 天 3 小時
30 天內合併 PR
3

描述

Type: Bug

I created a debug JSON file:

{
    // 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",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "args": "${command:pickArgs}"
        }
	]
}

When I start the debug and then enter an argument in the input filed, I get the following output error in the terminal:

$  /usr/bin/env d:\GIT\fso-sandbox-fsd-azure\Yigal\POC-AI\FSOEmbed\.venv\Scripts\python.exe c:\Users\yigal\.vscode\extensions\ms-python.debugpy-2025.10.0-win32-x64\bundled\libs\debugpy\launcher 62306 -- D:\GIT\fso-sandbox-fsd-azure\Yigal\POC-AI\FSOEmbed\.vscode\launch.json embed 
/usr/bin/env: ‘d:GITfso-sandbox-fsd-azureYigalPOC-AIFSOEmbed.venvScriptspython.exe’: No such file or directory

The first line shows the correct command to launch the debugger, however the second line that should start python, has NO slashes and it is one long string which of course does not exists.

If I modify the line "args": "${command:pickArgs}" and use "args": "process" then it work fine! (note: I want to pass each time a different argument)

I tried different options that I found on the internet but they did not help.
I think it is a VS Code issue.

VS Code version: Code 1.103.1 (360a4e4fd251bfce169a4ddf857c7d25d1ad40da, 2025-08-12T16:25:40.542Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) Ultra 7 265 (20 x 2381)
GPU Status 2d_canvas: enabled
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
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.71GB (48.22GB free)
Process Argv --crash-reporter-id a0d45abe-41a3-4a29-8ffe-de7f62139e82
Screen Reader no
VM 0%
Extensions (6)
Extension Author (truncated) Version
copilot Git 1.350.0
copilot-chat Git 0.30.1
debugpy ms- 2025.10.0
python ms- 2025.12.0
vscode-pylance ms- 2025.7.1
vscode-python-envs ms- 1.2.0
A/B Experiments
vsliv368:30146709
pythonvspyt551:31249599
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
747dc170:31275177
6518g693:31334701
aj953862:31281341
9d2cg352:31346308
convertlamdaf:31368658
usemarketplace:31343026
nesew2to5:31336538
agentclaude:31335814
replacestringexc:31350595
nes-set-on:31340697
onetestforazureexpcf:31335614
6abeh943:31336334
0927b901:31350571
ji9b5146:31348712
45650338:31358607
0cj2b977:31352657
0574c672:31362109
gemagent1cf:31368470
cloudbuttonc:31368503
retrydisabled:31368125

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。