-
Notifications
You must be signed in to change notification settings - Fork 524
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
Debugger is not started correctly when debugging containerized Python app in WSL #2641
Comments
I found a possible workaround, if @sobait or @kristjanvalur can try it. I set You can ignore the yellow squiggles / warning, the |
If I had to take a guess I'd say that WSL works with "localhost", unlike Linux. |
Thanks for that fast response. It works! I tinkered a lot with host and ports but never thought about testing |
And indeed this issue was the same as #2642. It also worked for me when running locally on Windows, but failed in WSL. |
Cool, thanks. By the way, what is the default value for this value? |
The logic for determining that value is this, basically (code here and here):
|
This might be another issue, or just me not understanding how to configure everything correctly. @bwateratmsft How to successfully debug when running vscode-docker extension inside a devcontainer? I have a devcontainer.json based on docker-from-docker, and trying to debug the same Python app as previously (which is in its own container). Setting |
Docker-from-Docker unfortunately doesn't really permit debugging. Bind mounts are used for Python debugging (and extensively used for .NET debugging), which are difficult or impossible to make work in a Docker-from-Docker arrangement. GitHub Codespaces recently changed over to a Docker-in-Docker setup for their default image; among other advantages it supports debugging Python and .NET. |
Thanks, I will look into Codespaces and see if I can learn something from it. It would be very nice to have a containerized dev environment for each app our team is working on, but have the same debugging capabilities as when running everything locally. |
This is now released in Docker extension version 1.10.0. |
Hi,
Similar issue as #2313. That solution didn't solve the issue to me. I have tried adding
"debugAdapterHost": "172.17.0.1"
, but it still doesn't work.Debugger doesn't connect to debugpy when starting my container. The container is built and run, but when handing over to debugpy nothing happens.
This is printed in the console, and then nothing more happens.
launch.json
- I've tried settinghost
to localhost too.task.json
Dockerfile
Environment
VSCode
Running remote VSCode in WSL2
The text was updated successfully, but these errors were encountered: