Skip to content

PATH is corrupted in VS Code terminal by debugpy no-config PATH contribution (missing path separator on Windows) #963

@SalikLP

Description

@SalikLP

Summary

In VS Code terminals on Windows, ms-python.debugpy appends to PATH without a ; separator.
This merges the last existing path entry with the debugpy path and breaks command resolution (e.g. sf not found).

Affected extension versions

  • ms-python.debugpy: 2025.18.0
  • ms-python.python: 2026.2.0
  • VS Code: 1.109.5 (user setup)
  • OS: Windows 11

What I observe

sf works in external terminals, but not in VS Code integrated terminal (Git Bash / PowerShell / CMD) for the affected workspace.

Evidence from "Terminal: Show Environment Contributions"

ms-python.debugpy contributes:

  • PATH=${env:PATH}c:\Users\<user>\.vscode\extensions\ms-python.debugpy-2025.18.0-win32-x64\bundled\scripts\noConfigScripts

There is no delimiter before c:\....

Why this is a bug

On Windows, PATH entries must be separated by ;.
Without it, previous entry + new entry get concatenated.

Example from terminal PATH (broken):

  • ...:/c/Users/<user>/AppData/Roaming/npmc:/Users/<user>/.vscode/extensions/ms-python.debugpy-.../noConfigScripts:...

Expected:

  • ...:/c/Users/<user>/AppData/Roaming/npm:/...
    (and debugpy path appended as a separate entry)

Repro steps

  1. Open a workspace in VS Code with Python Debugger extension enabled.
  2. Open integrated terminal.
  3. Run echo $PATH (Git Bash) or echo %PATH% (CMD).
  4. Observe concatenated segment ...npmc:/Users/... (or equivalent merge).
  5. Commands that rely on PATH entries near the merge may fail (sf in my case).

Expected behavior

Debugpy should append its no-config scripts folder as a separate PATH entry:

  • Windows: ${env:PATH};<debugpy-path>
  • POSIX shells: ${env:PATH}:<debugpy-path> (if shell-specific handling applies)

Workaround

Manually re-add missing PATH entry in terminal session, or disable/clear debugpy no-config contribution.

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