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

[BUG] Cannot debug using Debug > Start New Instance in the Solution Explorer #566

Closed
AnhQuanTrl opened this issue Sep 27, 2023 · 1 comment
Labels
area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire area-sdk bug Something isn't working

Comments

@AnhQuanTrl
Copy link

Describe the Issue

I'm currently using VSCode with WSL2. I could debug the application using the traditional launch.json way. However, when trying to debug using the new option in the Solution Explorer, it failed with the following error:


App: /home/arthur/dev/cas/src/ServiceHost/bin/Debug/net6.0/ServiceHost
Architecture: x64
App host version: 6.0.22
.NET location: Not found

Learn about runtime installation:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=ubuntu.22.04-x64&apphost_version=6.0.22
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program '[15503] ServiceHost' has exited with code 131 (0x83).

I have already installed dotnet sdk 6.0 and dotnet runtime using the version from Microsoft Feed (Ubuntu). Everything else worked fine except for this debugging feature.
Here is my dotnet --info result:

.NET SDK (reflecting any global.json):
 Version:   6.0.414
 Commit:    dc3b5c4341

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         ubuntu.22.04-x64
 Base Path:   /usr/share/dotnet/sdk/6.0.414/

Host:
  Version:      7.0.11
  Architecture: x64
  Commit:       ecb34f85ec

.NET SDKs installed:
  6.0.414 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.22 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.22 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Weirdly enough, if I'm installing dotnet sdk 7.0, there is a new error as C# Dev Kit tried to use the preinstall runtime instead:

Starting Spawn .NET server...
Starting Open a solution...
Starting Open a solution with environment service...
Starting Clear environment...
Using preinstalled .NET runtime at "../share/dotnet/dotnet"
.NET server STDERR: You must install .NET to run this application.

App: /home/arthur/.vscode-server/extensions/ms-dotnettools.csdevkit-0.4.10-linux-x64/components/vs-green-server/platforms/linux-x64/node_modules/@microsoft/visualstudio-server.linux-x64/Microsoft.VisualStudio.Code.Server
Architecture: x64
App host version: 7.0.5
.NET location: Not found

Learn about runtime installation:
https://aka.ms/dotnet/app-launch-failed

Download the .NET runtime:
https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=ubuntu.22.04-x64&apphost_version=7.0.5

.NET server exited with 131

I have to uninstall the dotnet-sdk-7.0 so that I can make the extension somewhat work again (except for the debugging feature of course).

Steps To Reproduce

  1. Running VSCode in WSL2
  2. Installing dotnet-sdk-6.0 through Microsoft feed (Ubuntu apt)
  3. Install the extension
  4. Try to use Debug > Start New Instance -> it fail even though launch.json work.

Expected Behavior

It should debug successfully using the new debug feature.

Environment Information

  • OS: Window WSL 2 Ubuntu 22.04
  • VSCode Version: 1.82.8
  • Extension version: 0.4.10
@AnhQuanTrl AnhQuanTrl added the bug Something isn't working label Sep 27, 2023
@timheuer timheuer added area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire and removed area-sdk labels Sep 28, 2023
@nagilson
Copy link
Member

nagilson commented Nov 1, 2023

This seems like a dupe of #637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dotnet-debugging Issues around .NET Debugging with console, ASP.NET, or Aspire area-sdk bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants