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 no longer possible after updating WSL to version 2.0.9.0 #11231

Closed
1 of 2 tasks
JustAnotherLars opened this issue Mar 1, 2024 · 8 comments
Closed
1 of 2 tasks

Comments

@JustAnotherLars
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.3155]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04

Other Software

Docker Desktop Windows (v4.28.0)
WSL-Version: 2.0.9.0
Kernelversion: 5.15.133.1-1
WSLg-Version: 1.0.59
MSRDC-Version: 1.2.4677
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows-Version: 10.0.22631.3155

Visual Studio 2022 Professional (17.9.1)

Repro Steps

  • Update WSL-Version from 1.2.5 to 2.0.9 with wsl.exe --install
  • Create a new vs project (with docker compatibility)
  • select windows docker container
  • Add this to the docker arguments: --network="WSL"
  • start debugging
  • notice that the network is not found
  • Check which Hyper V switches exist and find the following: WSL (Hyper-V firewall)
  • customize docker arguments with the existing network
  • start debugging again

Expected Behavior

VS compiles the project and will start the debugging process.
Among other things, Docker uses the Hyper v virtual switch with the name "WSL".

Actual Behavior

The project is not compiled.
VS reports that the remote debugging service is not available and cancels the process.
The following switch appears in the Hyper v virtual switches list:
WSL (Hyper-V firewall)

VS gives the following error:


Microsoft Visual Studio

Debugging cannot be started.

Visual Studio Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because communication with the remote computer is prevented by a firewall. Information on configuring remote debugging can be found in the help.

OK

I have already switched off all firewalls. The behavior persists.
Even reinstalling my computer did not solve the problem.

Diagnostic Logs

No response

Copy link

github-actions bot commented Mar 1, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Denarius33
Copy link

I have exactly the same issue and can't find a solution for it.

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 4, 2024

/logs

Copy link
Contributor

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue.

Thank you!

Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!

@benhillis
Copy link
Member

I think I have an idea what's going on here... When we introduced support for Hyper-V Firewall, the name of the network we create is now "WSL (Hyper-V firewall)".

@benhillis benhillis reopened this Mar 12, 2024
@benhillis
Copy link
Member

Try passing that instead.

Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!

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

No branches or pull requests

4 participants