vscode-csharp: Debugger silently fails to connect to target process on Arch

Issue Description

Breakpoints do not work when running either a console or web application…most of the time. On occasion, it will randomly begin running correctly. Even when stopping and immediately starting the project again.

Steps to Reproduce

dotnet new console
// set breakpoint
// debug project

or

dotnet new mvc
// set breakpoint in controller
// debug project

Expected Behavior

Program to stop execution on breakpoints selected

Actual Behavior

console -> Program runs to end of execution (this was a new console project)

mvc -> Breakpoint is grayed out and never hit // hovering over the grayed out breakpoint gives the message: ‘The breakpoint is pending and will be resolved when debugging starts.’

Logs

NOTE: These logs were from running a new mvc project

OmniSharp log

Starting OmniSharp server at 5/11/2020, 8:34:56 AM Target: /[path]/[to]/[project]/demo

OmniSharp server started with Mono 6.4.0. Path: /home/[user]/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/OmniSharp.exe PID: 4375

    Starting OmniSharp on arch 0.0 (x64)
    DotNetPath set to dotnet
    It looks like you have Mono 6.4.0 or greater installed but MSBuild could not be found.

Try installing MSBuild into Mono (e.g. ‘sudo apt-get install msbuild’) to enable better MSBuild support, or upgrade to latest Mono: https://www.mono-project.com/download/stable/. info: OmniSharp.MSBuild.Discovery.MSBuildLocator Located 1 MSBuild instance(s) 1: StandAlone 16.4 - “/home/[user]/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin” info: OmniSharp.MSBuild.Discovery.MSBuildLocator MSBUILD_EXE_PATH environment variable set to ‘/home/[user]/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin/MSBuild.dll’ info: OmniSharp.MSBuild.Discovery.MSBuildLocator Registered MSBuild instance: StandAlone 16.4 - “/home/[user]/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin” CscToolExe = csc.exe MSBuildToolsPath = /home/[user]/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin CscToolPath = /home/[user]/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin/Roslyn BypassFrameworkInstallChecks = true MSBuildExtensionsPath = /home/[user]/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild info: OmniSharp.Cake.CakeProjectSystem Detecting Cake files in ‘/[path]/[to]/[project]/demo’. info: OmniSharp.Cake.CakeProjectSystem Could not find any Cake files info: OmniSharp.MSBuild.ProjectSystem No solution files found in ‘/[path]/[to]/[project]/demo’ info: OmniSharp.MSBuild.ProjectManager Queue project update for ‘/[path]/[to]/[project]/demo/demo.csproj’ info: OmniSharp.Script.ScriptProjectSystem Detecting CSX files in ‘/[path]/[to]/[project]/demo’. info: OmniSharp.Script.ScriptProjectSystem Could not find any CSX files info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0 info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100 info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110 info: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140 info: OmniSharp.MSBuild.ProjectManager Loading project: /[path]/[to]/[project]/demo/demo.csproj info: OmniSharp.WorkspaceInitializer Configuration finished. info: OmniSharp.Stdio.Host Omnisharp server running using Stdio at location ‘/[path]/[to]/[project]/demo’ on host 4176. info: OmniSharp.MSBuild.ProjectManager Successfully loaded project file ‘/[path]/[to]/[project]/demo/demo.csproj’. info: OmniSharp.MSBuild.ProjectManager Adding project ‘/[path]/[to]/[project]/demo/demo.csproj’ info: OmniSharp.MSBuild.ProjectManager Update project: demo

C# log

(no output)

Environment information

VSCode version: 1.45.0 C# Extension: 1.21.18

Mono Information OmniSharp using global mono :6.4.0
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.103 Commit: 6f74c4a1dd

Runtime Environment: OS Name: arch OS Version:
OS Platform: Linux RID: arch-x64 Base Path: /usr/share/dotnet/sdk/3.1.103/

Host (useful for support): Version: 3.1.3 Commit: ed88943d24

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

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

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
asp-net-core-vs-code-extension-pack temilaj 1.0.3
aspnet-helper schneiderpat 0.6.4
cpptools ms-vscode 0.27.1
csharp ms-dotnettools 1.21.18
Csharp-ASPNETCore rahulsahay 1.11.0
csharpextensions jchannon 1.3.1
docomment k–kato 0.1.9
dotnet-test-explorer formulahendry 0.7.1
gc-excelviewer GrapeCity 2.1.34
java redhat 0.61.0
mssql ms-mssql 1.9.0
python ms-python 2020.4.76186
razor-plus austincummings 0.1.4
remote-containers ms-vscode-remote 0.117.0
vsc-community-material-theme Equinusocio 1.4.1
vsc-material-theme Equinusocio 32.6.0
vsc-material-theme-icons equinusocio 1.1.4
vscode-docker ms-azuretools 1.1.0
vscode-java-debug vscjava 0.25.1
vscode-java-dependency vscjava 0.10.0
vscode-java-pack vscjava 0.9.0
vscode-java-test vscjava 0.22.3
vscode-maven vscjava 0.21.3
vscode-typescript-tslint-plugin ms-vscode 1.2.3
vscodeintellicode VisualStudioExptTeam 1.2.7
vsliveshare ms-vsliveshare 1.0.2106

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@paulsebeikin: your issue is actually different. Your problem is that you installed the OSS version of Visual Studio Code, but the debugger is only licensed to work in official Microsoft products. Unfortunately due to both a bug in the debugger, and a bug in VS Code, that error message doesn’t come up. You can fix the issue by installing the official version of VS Code from Microsoft. More info: https://github.com/OmniSharp/omnisharp-vscode/wiki/Microsoft-.NET-Core-Debugger-licensing-and-Microsoft-Visual-Studio-Code