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

Debugging Python in Docker #3823

Closed
JanPalasek opened this issue Feb 3, 2023 · 20 comments
Closed

Debugging Python in Docker #3823

JanPalasek opened this issue Feb 3, 2023 · 20 comments

Comments

@JanPalasek
Copy link

JanPalasek commented Feb 3, 2023

I created a sample project using Docker > Add Docker Files to Workspace.

Then I ran Ctrl + F5, it correctly builds the image but then it raises an error that I can't get rid of:

Invalid message: "pythonPath" is not valid if "python" is specified.

Here is the sample project. I left everything default, just added app.py with a hello world message.

test.zip

Versions

  • System: Windows 11 using WSL 2 on Ubuntu 20.04.
  • Docker vscode: v1.23.3
  • Python vscode: v2023.2.0
@eladavron
Copy link

eladavron commented Feb 5, 2023

Started seeing this too in VSCode 1.75.
Downgrading to 1.74 makes it go away (but that's not a solution)

@cdena
Copy link

cdena commented Feb 6, 2023

I am also having this same issue and I found there is an open issue on the vscode repo as well.

microsoft/vscode#173319

@bwateratmsft
Copy link
Collaborator

Did this issue start happening recently, or has it been a few weeks? It might be a Python extension issue.

@gailmichi
Copy link

Same problem here on v1.75, last week my docker project was running without any problems. No updates on python since then, maybe auto-update on VSCode.

VSCode: 1.75
Python: 3.10.9
Mac: 13.2

@bwateratmsft
Copy link
Collaborator

No updates on Docker extension since 19 December; Python extension was updated today, and IIRC sometime last week as well. So I think it's something between VSCode and/or Python extension.

@KhASQ
Copy link

KhASQ commented Feb 6, 2023

Same issue here
vscode 1.75
Windows 10

It works after downgrading vscode to 1.74 and reinstall python extension

@ivs-cetmix
Copy link

Reported here as well
microsoft/vscode-python#20655

@SpyRefused
Copy link

Same here, it had version 1.75. Windows 11.

I fixed it by downgrading to 1.74 (and reinstall Python Extension)

@raldebsi
Copy link

Same problem here. It was working fine 10 minutes ago. I had to restart VS Code due to a crash, and it decided to update. Now I get this error.

@cesarlaforet
Copy link

same problem :(

Version: 1.75.1 (user setup)
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:32:34.589Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No

@debemdeboas
Copy link

Same error here. It suddenly decided to stop working after the update.

@eladavron
Copy link

eladavron commented Feb 28, 2023

It has not been solved by #3641

@raldebsi
Copy link

I also confirm that this is still the same issue

@danegsta
Copy link
Contributor

#3641 was an unrelated Python debugging issue; this specific issue is unfortunately external to the Docker extension that will require a fix in either vscode itself or (more likely) the Python extension to resolve. We're keeping this issue opened as a tracking issue, but microsoft/vscode-python#20655 is the issue to follow for any progress on a fix in the Python extension.

@atomey
Copy link

atomey commented Mar 1, 2023

Confirmed here also. I was unable to debug my Docker/Python application with VSCode after 1.74. I have now had to downgrade twice to 1.74.3 to resume normal Docker/Python debug functionality in VSCode.

I'm using a virtualenv also for my Python path in case it matters.

@ultrablue
Copy link

Is downgrading the only known workaround?

@bwateratmsft
Copy link
Collaborator

bwateratmsft commented Mar 3, 2023

@ultrablue the pre-release version of the Python extension seems to fix the issue. You can get it by going to the Extensions view, right-clicking the Python extension, and choosing "Switch to Pre-Release Version":

image

@ultrablue
Copy link

@bwateratmsft Confirmed. It looks like that did the trick for me.
Thank you!!

@atomey
Copy link

atomey commented Mar 3, 2023

This is working for me now in 1.76 VSCode which was released in last 2 days.

@dbreshears
Copy link
Member

Thanks for confirming. Will close this issue since it is being handled externally

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests