Skip to content

Python debugger not working properly in 1.88 with Git Bash shell #314

@IvanCobotic

Description

@IvanCobotic

Since I updated to VSCode 1.88 im facing issues with debugging python on windows.
Im using

Environment
Version: 1.88.1 (user setup)
Commit: e170252f762678dec6ca2cc69aba1570769a5d39
Date: 2024-04-10T17:41:02.734Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

git version 2.44.0.windows.1
"terminal.integrated.defaultProfile.windows": "Git Bash"

If i run the following launch configuration

{
            "name": "Python: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "justMyCode": true
        },

launching test.py

print('hello world')

with a breakpoint , the first time i launch the debugger i get the following commandline output
$/usr/bin/env c:\\mygits\\deepose\\.venv\\Scripts\\python.exe c:\\Users\\IvanL\\.vscode\\extensions\\ms-python.debugpy-2024.4.0-win32-x64\\bundled\\libs\\debugpy\\adapter/../..\\debugpy\\launcher 52743 -- C:\\mygits\\deepose\\python\\experimental\\test.py

which is correct. If I then hit the restart debug command, i get

$^C
$anL\\.vscode\\extensions\\ms-python.debugpy-2024.4.0-win32-x64\\bundled\\libs\\debugpy\\adapter/../..\\debugpy\\launcher 52831 -- C:\\mygits\\deepose\\python\\experimental\\test.py 
bash: anL\.vscode\extensions\ms-python.debugpy-2024.4.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher: No such file or directory

which is incorrect, for some reason the
/usr/bin/env c:\\mygits\\deepose\\.venv\\Scripts\\python.exe c:\\Users\\Iv
got peeled of from the command line input.

Metadata

Metadata

Assignees

Labels

WindowsbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions