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 stops working right after debugging any .NET Core application on Manjaro

See original GitHub issue

Environment data

dotnet --info output:

[perret@perret-pc ~]$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.2.102
 Commit:    96ff75a873

Runtime Environment:
 OS Name:     manjaro
 OS Version:  
 OS Platform: Linux
 RID:         arch-x64
 Base Path:   /opt/dotnet/sdk/2.2.102/

Host (useful for support):
  Version: 2.2.1
  Commit:  878dd11e62

.NET Core SDKs installed:
  2.2.102 [/opt/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.NETCore.App 2.2.1 [/opt/dotnet/shared/Microsoft.NETCore.App]

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

VS Code version:

[perret@perret-pc ~]$ code --version
1.30.2
61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
x64

C# Extension version: 1.17.1 Omnisharp version 1.32.8

Omnisharp when opening Visual Studio Code with my project in the working directory:

Starting OmniSharp server at 2/3/2019, 11:36:15 AM
    Target: /home/perret/Desktop/Playground/CSharpmusement/Meow

OmniSharp server started with Mono 5.16.0.
    Path: /home/perret/.vscode-oss/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/OmniSharp.exe
    PID: 23375

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on manjaro 0.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 2 MSBuild instance(s)
            1: Mono 15.0 - "/usr/lib/mono/msbuild/15.0/bin"
            2: StandAlone 15.0 - "/home/perret/.vscode-oss/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: Mono 15.0 - "/usr/lib/mono/msbuild/15.0/bin"
            CscToolPath = /home/perret/.vscode-oss/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin/Roslyn
            CscToolExe = csc.exe
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/home/perret/Desktop/Playground/CSharpmusement/Meow'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
        No solution files found in '/home/perret/Desktop/Playground/CSharpmusement/Meow'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/home/perret/Desktop/Playground/CSharpmusement/Meow/Meow.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/home/perret/Desktop/Playground/CSharpmusement/Meow'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/home/perret/Desktop/Playground/CSharpmusement/Meow' on host 23259.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /home/perret/Desktop/Playground/CSharpmusement/Meow/Meow.csproj
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/home/perret/Desktop/Playground/CSharpmusement/Meow/Meow.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/home/perret/Desktop/Playground/CSharpmusement/Meow/Meow.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Update project: Meow

Steps to reproduce

If needed, Install Arch / Manjaro and yay in order to easily install packages from AUR.

pacman -Sy yay
yay -S dotnet-sdk --noconfirm
yay -S mono --noconfirm
yay -S msbuild-stable --noconfirm
yay -S code --noconfirm

Then creating the default mvc or (console) solution and opening up Visual Studio Code, installing the C# extension, adding the default assets.

mkdir Meow
cd Meow
dotnet new mvc
code .

Install the C# extension <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>P</kbd> ext install ms-vscode.csharp [Restart if needed]

Download the .NET Code Debugger for the C# extension (if needed / not already done the first time) <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>P</kbd> Debug: Download .NET Core Debugger

Generate the launch.json and tasks.json files (if not already answered yes to the popup shows: “Would you like to add the required assets to build and debug your project?”) <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>P</kbd> .NET: Generate Assets for Build and Debug

Debugging (.NET Core Launch (web)) <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>D</kbd> <kbd>F5</kbd>

Expected behavior

The debugging bar should remain active, the application should be running and open the web browser to the related address:port.

Actual behavior

The debugging bar shows up for 0.1 sec and then disappear, the application is not running (not action equivalent to a dotnet run) and no web browser is actually open.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
natalie-o-perretcommented, Feb 5, 2019

@gregg-miskelly good news: managed to make it work with… the code insiders version!

I managed to have everything working from scratch (Manjaro XFCE edition 18.02 on a live session):

Baby steps

  • Install yay to enjoy AUR without struggling with the command line: sudo pacman -Sy yay

  • Setup everything you need (aka the .NET Core SDK, Mono, MSBuild and Visual Studio Code Insiders): yay -S dotnet-sdk mono msbuild-stable visual-studio-code-insiders --noconfirm

  • Create a dummy project: dotnet new console

  • Start Visual Studio Code Insiders: code-insiders .

  • Install the C# extension <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>P</kbd> ext install ms-vscode.csharp

  • Download the .NET Code Debugger for the C# extension (if needed / not already done the first time) <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>P</kbd> Debug: Download .NET Core Debugger

  • Generate the launch.json and tasks.json files (if not already answered yes to the popup shows: “Would you like to add the required assets to build and debug your project?”) <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>P</kbd> .NET: Generate Assets for Build and Debug

  • Debugging (.NET Core Launch (console)) <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>D</kbd> <kbd>F5</kbd>

0reactions
natalie-o-perretcommented, Feb 5, 2019

@gregg-miskelly this is what this package provides, the tar.gz included in the AUR package is the official one, it just simplifies the installation on the given Linux distribution (Arch / Manjaro)

Actually, I can try directly with the archive (since it’s the same) on the vs code website to show you that the end result is the same, will copy paste the log here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] .NET Core, unable to debug in Visual Studio Code
I'm currently trying to develop C# software with .NET Code in Visual Studio Code. I succeeded to run the code via dotnet run,...
Read more >
Debug_shell not working - Support - Manjaro Linux Forum
Hi all, I try to debug linux boot with systemd debug_shell, but I am not able to get into the shell. Until now,...
Read more >
The .NET Core SDK cannot be located. .NET Core debugging ...
Just simply close your VS Code app. It seems the error is produced because you are installing .NET Core SDK when your VS...
Read more >
Using C++ on Linux in VS Code
After configuring VS Code, you will compile and debug a simple C++ program in VS Code. This tutorial does not teach you GCC,...
Read more >
Debugging with GDB - sourceware.org
If the command line specified a program to debug, or a process to attach to, or a core file, GDB loads any auto-loaded...
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