Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
IvanCobotic opened this issue Apr 15, 2024 · 7 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug Windows

Comments

@IvanCobotic
Copy link

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.

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 15, 2024
@JJ-empowered
Copy link

Version: 1.88.1 (system 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

I'm seeing something very similar. I did find that if I kill the current terminals I have opened I can run the debugger exactly once. After this it will fail with the above mentioned error. If I kill all terminals again, I am then able to run the debugger once again before seeing this error.

@cltien
Copy link

cltien commented Apr 18, 2024

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.17763

After I updated VSC this morning, it won't be able to debug the python code anymore,

The last two lines of the messages look like these:
[441C:3D80][2023-06-08T11:47:40]i001: Burn v3.10.4.4718, Windows v10.0 (Build 17763: Service Pack 0), path: C:\WINDOWS\Temp{15A7C23D-BD96-4211-9F47-AEAC065355A1}.cr\VC_redist.x64.exe
^
SyntaxError: invalid decimal literal

@rotkiv1205
Copy link

I face the same issue.

@parkhomenko-alexander
Copy link

but all work good if default terminal is cmd

@wangmumu0601
Copy link

I have this problem too. If someone finds a solution or if it's fixed in the next version, please tell me.
for now, I'm using "console": "internalConsole" in launch.json, which lets me debug.
but the internal console doesn't look as nice as my custom Git Bash terminal, maybe i will used the vscode1.87 instead

@paulacamargo25 paulacamargo25 added Windows bug Issue identified by VS Code Team member as probable bug and removed triage-needed Needs assignment to the proper sub-team labels May 31, 2024
@wangmumu0601
Copy link

i face the same in java on vscode-1.89. luckily, vscode-1.90 fixed this problem today.

@eleanorjboyd
Copy link
Member

Hi! Looks like this might be fixed from the last comment, if not please comment and we can reopen. Thanks!

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug Windows
Projects
None yet
Development

No branches or pull requests

9 participants