Repository navigation
Regression (Windows): debugpy 2026.4.0 fails to launch with ENOENT due to quoted interpreter path #1019
Copy link
Copy link
Closed
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
Description
Regression on Windows after updating Python Debugger to 2026.4.0.
Debug sessions with type: "debugpy" fail immediately with spawn ENOENT, even though the interpreter exists and is selected.
Downgrading to ms-python.debugpy@2025.18.0 fixes the issue immediately.
This started between April 29, 2026 and April 30, 2026.
Environment data
- OS: Windows 11 x64
- VS Code: 1.117.0
- Python extension: ms-python.python@2026.4.0
- Python Debugger (broken): ms-python.debugpy@2026.4.0
- Python Debugger (working): ms-python.debugpy@2025.18.0
- Pylance: ms-python.vscode-pylance@2026.2.1
- Interpreter: workspace
.venv\Scripts\python.exe(Python 3.14.2) - Workspace path contains spaces (OneDrive-based path)
launch.json configuration (anonymized)
{
"name": "Repro: debugpy launch",
"type": "debugpy",
"request": "launch",
"module": "samplepkg.tasks.repro.main",
"console": "integratedTerminal",
"logToFile": true,
"python": "${workspaceFolder}/.venv/Scripts/python.exe",
"cwd": "${workspaceFolder}",
"args": [
"--root", "<DATASET_ROOT>",
"--out", "<DATASET_ROOT>/master.json",
"--csv-delimiter", ",",
"--csv-quotechar", "\"",
"--csv-doublequote",
"--encoding", "utf-8-sig"
],
"env": {
"PYTHONPATH": "${workspaceFolder}/src"
}
}Actual behavior
Debug does not start. Log shows spawn ENOENT, where the python path appears additionally quoted in syscall and path.
Expected behavior
Debug session should launch normally with the selected workspace interpreter.
Steps to reproduce
- On Windows, open a workspace with spaces in the full path.
- Use a local
.venvinterpreter. - Run a
debugpylaunch config (request: launch,type: debugpy). - Observe immediate failure with ENOENT.
- Downgrade
ms-python.debugpyto2025.18.0. - Re-run same config -> works.
Sanitized log excerpt
0 Starting Session:
{
"name": "Repro: debugpy launch",
"type": "debugpy",
"request": "launch",
"module": "samplepkg.tasks.repro.main",
"console": "integratedTerminal",
"logToFile": true,
"args": [
"--root",
"<DATASET_ROOT>",
"--out",
"<DATASET_ROOT>/master.json",
"--csv-delimiter",
",",
"--csv-quotechar",
"\\\"",
"--csv-doublequote",
"--encoding",
"utf-8-sig"
],
"env": {
"PYTHONPATH": "C:\\Users\\<USER>\\<WORKSPACE>\\src",
"PYTHONIOENCODING": "UTF-8",
"PYTHONUNBUFFERED": "1"
},
"__configurationTarget": 6,
"python": "c:\\Users\\<USER>\\<WORKSPACE>\\.venv\\Scripts\\python.exe",
"debugAdapterPython": "c:\\Users\\<USER>\\<WORKSPACE>\\.venv\\Scripts\\python.exe",
"debugLauncherPython": "c:\\Users\\<USER>\\<WORKSPACE>\\.venv\\Scripts\\python.exe",
"clientOS": "windows",
"cwd": "c:\\Users\\<USER>\\<WORKSPACE>",
"envFile": "c:\\Users\\<USER>\\<WORKSPACE>\\.env",
"stopOnEntry": false,
"showReturnValue": true,
"internalConsoleOptions": "neverOpen",
"terminalQuoteCharacter": "'",
"debugOptions": [
"ShowReturnValue",
"FixFilePathCase"
],
"justMyCode": true,
"workspaceFolder": "c:\\Users\\<USER>\\<WORKSPACE>"
}
8 Error:
{
"errno": -4058,
"code": "ENOENT",
"syscall": "spawn \"c:\\Users\\<USER>\\<WORKSPACE>\\.venv\\Scripts\\python.exe\"",
"path": "\"c:\\Users\\<USER>\\<WORKSPACE>\\.venv\\Scripts\\python.exe\"",
"spawnargs": [
"c:\\Users\\<USER>\\.vscode\\extensions\\ms-python.debugpy-2026.4.0-win32-x64\\bundled\\libs\\debugpy\\adapter",
"--log-dir",
"c:\\Users\\<USER>\\.vscode\\extensions\\ms-python.debugpy-2026.4.0-win32-x64"
]
}
14 Client --> Adapter:
{
"command": "initialize",
"arguments": {
"clientID": "vscode",
"clientName": "Visual Studio Code",
"adapterID": "debugpy",
"pathFormat": "path",
"linesStartAt1": true,
"columnsStartAt1": true,
"supportsVariableType": true,
"supportsVariablePaging": true,
"supportsRunInTerminalRequest": true,
"locale": "en",
"supportsProgressReporting": true,
"supportsInvalidatedEvent": true,
"supportsMemoryReferences": true,
"supportsArgsCanBeInterpretedByShell": true,
"supportsMemoryEvent": true,
"supportsStartDebuggingRequest": true,
"supportsANSIStyling": true
},
"type": "request",
"seq": 1
}
15 Client --> Adapter:
{
"command": "disconnect",
"arguments": {
"restart": false
},
"type": "request",
"seq": 2
}
17 Error:
{}
725 Stopping Session
Additional notes
Potentially related to path-quoting behavior in ms-python.debugpy@2026.4.0 release notes.
Related issues:
- debugpy does not quote spaces in command line arguments. #820
- VS Code Python debugger stops immediately when using system Python interpreter (works with .venv) #838
- "Debug Stopped" no matter "Start Debugging" or "Run Without Debugging" #826
- Spaces in python interpreter path or program result in incorrectly quoted debugging commands with arguments #233
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Activity
rchiodo commentedon Apr 30, 2026
Thanks for the issue. This is a dupe of #1013
rchiodo commentedon Apr 30, 2026
We have a fix just working on verifying it works everywhere.
rchiodo commentedon Apr 30, 2026
See the zip I included in the PR for the fix if you want to try it out:
#1015