vscode-csharp
vscode-csharp copied to clipboard
Can not debug a simple Hello World C# console application (obtain Unknown Error: 0x80131c3c)
Issue Description
I can not debug a simple Hello World C# console application. When I run the debugger, on then "Debug console" I get the message "Unable to attach to CoreCLR. Unknown Error: 0x80131c3c"
Steps to Reproduce
Create a new console application cd into new created application folder and launch code . Run debugger pressing F5 or from Run menu
Expected Behavior
Can debug c# code
Actual Behavior
Get error "Unable to attach to CoreCLR. Unknown Error: 0x80131c3c"
Logs
OmniSharp log
OmniSharp server started with .NET 6.0.108 . Path: /home/malix/.vscode/extensions/ms-dotnettools.csharp-1.25.0-linux-x64/.omnisharp/1.39.0-net6.0/OmniSharp.dll PID: 321972
Starting OmniSharp on Unknown 0.0 (Unknown) info: OmniSharp.Services.DotNetCliService Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK info: OmniSharp.Services.DotNetCliService Using the 'dotnet' on the PATH. info: OmniSharp.Services.DotNetCliService DotNetPath set to dotnet info: OmniSharp.MSBuild.Discovery.MSBuildLocator Located 1 MSBuild instance(s) 1: .NET Core SDK 6.0.108 17.0.0 - "/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108/" info: OmniSharp.MSBuild.Discovery.MSBuildLocator Registered MSBuild instance: .NET Core SDK 6.0.108 17.0.0 - "/usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108/" info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0 info: OmniSharp.MSBuild.ProjectSystem No solution files found in '/home/malix/projects/C#/console' info: OmniSharp.MSBuild.ProjectManager Queue project update for '/home/malix/projects/C#/console/console.csproj' info: OmniSharp.Script.ScriptProjectSystem Detecting CSX files in '/home/malix/projects/C#/console'. info: OmniSharp.Script.ScriptProjectSystem Did not find any CSX files info: OmniSharp.WorkspaceInitializer Configuration finished. info: OmniSharp.Stdio.Host Omnisharp server running using Stdio at location '/home/malix/projects/C#/console' on host 321781. info: OmniSharp.MSBuild.ProjectManager Loading project: /home/malix/projects/C#/console/console.csproj info: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/home/malix/projects/C#/console/console.csproj'. info: OmniSharp.MSBuild.ProjectManager Adding project '/home/malix/projects/C#/console/console.csproj' info: OmniSharp.MSBuild.ProjectManager Update project: console
C# log
Environment information
VSCode version: 1.70.1 C# Extension: 1.25.0
Mono Information
OmniSharp using mono :6.8.0Dotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.108 Commit: 4e3a463d2bRuntime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108/
global.json file: Not found
Host: Version: 6.0.8 Architecture: x64 Commit: 55fb7ef977
.NET SDKs installed: 6.0.108 [/usr/lib/dotnet/dotnet6-6.0.108/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.NETCore.App]
Download .NET: https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs: https://aka.ms/dotnet/runtimes-sdk-info
Visual Studio Code Extensions
| Extension | Author | Version |
|---|---|---|
| cpptools | ms-vscode | 1.11.5 |
| csharp | ms-dotnettools | 1.25.0 |
| gitlens | eamodio | 12.1.2 |
| go | golang | 0.35.1 |
| intellicode-api-usage-examples | VisualStudioExptTeam | 0.2.0 |
| java | redhat | 1.9.0 |
| jupyter | ms-toolsai | 2022.7.1102252217 |
| jupyter-keymap | ms-toolsai | 1.0.0 |
| jupyter-renderers | ms-toolsai | 1.0.9 |
| platformio-ide | platformio | 2.5.2 |
| python | ms-python | 2022.12.0 |
| remote-containers | ms-vscode-remote | 0.245.0 |
| rest-book | tanhakabir | 6.2.1 |
| rust-analyzer | rust-lang | 0.4.1169 |
| vscode-docker | ms-azuretools | 1.22.1 |
| vscode-icons | vscode-icons-team | 11.15.0 |
| vscode-java-debug | vscjava | 0.43.0 |
| vscode-java-dependency | vscjava | 0.21.0 |
| vscode-java-pack | vscjava | 0.25.0 |
| vscode-java-test | vscjava | 0.36.0 |
| vscode-language-pack-it | MS-CEINTL | 1.70.8100917 |
| vscode-lldb | vadimcn | 1.7.4 |
| vscode-maven | vscjava | 0.37.0 |
| vscode-pylance | ms-python | 2022.8.20 |
| vscode-solution-explorer | fernandoescolar | 0.5.0 |
| vscodeintellicode | VisualStudioExptTeam | 1.2.22 |
That error code is CORDBG_E_DEBUG_COMPONENT_MISSING, which means that the .NET Debugging services couldn't locate libmscordbi.so and/or libmscordaccore.so next to the libcoreclr.dll that your project is using.
I am closing this for now. If you are still running into the problem and need help investigating, let us know.