question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger silently fails to connect to target process on Arch

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
gregg-miskellycommented, May 12, 2020

@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

0reactions
bDarbonnecommented, May 19, 2020

Thank you @gregg-miskelly! Funny thing happened. I followed your instructions. Ran the project with ./vsdbg-ui --server --consoleLogging one final time (with the generated libdbgshim.so) before trying to debug as suggested… The breakpoints work now. Decided to swap out the .so file for the original just for kicks and giggles. It’s working just fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

the script debugger failed to connect to the target process ...
The error pops up because VS is attached as script debugger. This means that you can use VS to debug the javascript instead...
Read more >
Talk:General troubleshooting - ArchWiki
Installed Arch on my laptop, during pacstrap the screen went blank, ... That's why it's much more likely that a troubleshooting procedure can...
Read more >
Visual Studio 2017 (15.5.2) - The script debugger failed to ...
"The script debugger failed to connect to the target process. An error occurred that usually indicates a corrupt installation (code 0x80040154).
Read more >
n - The LLDB Debugger - LLVM
Tells the debugger to attach to a process with the given name. ... tells the debugger to run this one-line lldb command if...
Read more >
Core Command-line Options - Valgrind
If a Valgrinded process fails to connect to a listener, for whatever reason (the listener isn't running, invalid or unreachable host or port,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found