Generated by: Claude Code
Environment
OS: Windows 11
VS Code Python Debugger extension: v2026.4.0 (also reproduced on v2026.5.11171013)
Python: 3.13.5 (uv-managed venv)
Workspace path contains spaces: C:\Users\thomv\FutureWater\FutureWater - Team\Projects\Active\2022304_WE-ACT\97-Thomas
Symptom
Pressing F5 ends the debug session within ~1 second. No errors in the UI, no breakpoint hit (even with stopOnEntry: true). The Python Debugger output channel shows only DAP Server launched and nothing after.
Root cause (from adapter log with logToFile: true)
3 Error:
{
"errno": -4058,
"code": "ENOENT",
"syscall": "spawn "c:\Users\thomv\FutureWater\FutureWater - Team\Projects\Active\2022304_WE-ACT\97-Thomas\.venv\Scripts\python.exe"",
"path": ""c:\Users\thomv\FutureWater\FutureWater - Team\Projects\Active\2022304_WE-ACT\97-Thomas\.venv\Scripts\python.exe"",
"spawnargs": [
"c:\Users\thomv\.vscode\extensions\ms-python.debugpy-2026.4.0-win32-x64\bundled\libs\debugpy\adapter",
"--log-dir",
"c:\Users\thomv\.vscode\extensions\ms-python.debugpy-2026.4.0-win32-x64"
]
}
The path field contains literal " characters around the python executable path. Node's child_process.spawn() does not strip quotes from the file argument, so it tries to find a file whose name includes the quote characters, which doesn't exist → ENOENT → instant exit.
The quoting was presumably added to defend against spaces, but spawn() already passes file separately from args and does not need it.
Reproduction
Place a project under any path containing a space (e.g. C:\Users\me\My Folder\proj).
Create a .venv there.
Open in VS Code, F5 with a basic debugpy launch config.
Result: session dies in ~1 second.
Workaround
Open the project via a directory junction at a no-space path (mklink /J C:\proj ). Setting "python" to a Windows 8.3 short path in launch.json does not work because resolveAndUpdatePythonPath overrides it with the long workspace-derived path.
Generated by: Claude Code
Environment
OS: Windows 11
VS Code Python Debugger extension: v2026.4.0 (also reproduced on v2026.5.11171013)
Python: 3.13.5 (uv-managed venv)
Workspace path contains spaces: C:\Users\thomv\FutureWater\FutureWater - Team\Projects\Active\2022304_WE-ACT\97-Thomas
Symptom
Pressing F5 ends the debug session within ~1 second. No errors in the UI, no breakpoint hit (even with stopOnEntry: true). The Python Debugger output channel shows only DAP Server launched and nothing after.
Root cause (from adapter log with logToFile: true)
3 Error:
{
"errno": -4058,
"code": "ENOENT",
"syscall": "spawn "c:\Users\thomv\FutureWater\FutureWater - Team\Projects\Active\2022304_WE-ACT\97-Thomas\.venv\Scripts\python.exe"",
"path": ""c:\Users\thomv\FutureWater\FutureWater - Team\Projects\Active\2022304_WE-ACT\97-Thomas\.venv\Scripts\python.exe"",
"spawnargs": [
"c:\Users\thomv\.vscode\extensions\ms-python.debugpy-2026.4.0-win32-x64\bundled\libs\debugpy\adapter",
"--log-dir",
"c:\Users\thomv\.vscode\extensions\ms-python.debugpy-2026.4.0-win32-x64"
]
}
The path field contains literal " characters around the python executable path. Node's child_process.spawn() does not strip quotes from the file argument, so it tries to find a file whose name includes the quote characters, which doesn't exist → ENOENT → instant exit.
The quoting was presumably added to defend against spaces, but spawn() already passes file separately from args and does not need it.
Reproduction
Place a project under any path containing a space (e.g. C:\Users\me\My Folder\proj).
Create a .venv there.
Open in VS Code, F5 with a basic debugpy launch config.
Result: session dies in ~1 second.
Workaround
Open the project via a directory junction at a no-space path (mklink /J C:\proj ). Setting "python" to a Windows 8.3 short path in launch.json does not work because resolveAndUpdatePythonPath overrides it with the long workspace-derived path.