Skip to content

Regression (Windows): debugpy 2026.4.0 fails to launch with ENOENT due to quoted interpreter path #1019

@michaeltufar

Description

@michaeltufar

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

  1. On Windows, open a workspace with spaces in the full path.
  2. Use a local .venv interpreter.
  3. Run a debugpy launch config (request: launch, type: debugpy).
  4. Observe immediate failure with ENOENT.
  5. Downgrade ms-python.debugpy to 2025.18.0.
  6. 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions