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.

Can debug 2.2 apps, but not 3.0 apps on macOS and (some?) Linux

See original GitHub issue

Environment data

Mac OS (Mojave) dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview-009812
 Commit:    e3abf6e935

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.0.100-preview-009812/

Host (useful for support):
  Version: 3.0.0-preview1-27101-02
  Commit:  f1ad6079ca

.NET Core SDKs installed:
  2.1.302 [/usr/local/share/dotnet/sdk]
  2.1.401 [/usr/local/share/dotnet/sdk]
  2.1.500 [/usr/local/share/dotnet/sdk]
  2.2.100-preview1-009349 [/usr/local/share/dotnet/sdk]
  2.2.100-preview2-009404 [/usr/local/share/dotnet/sdk]
  2.2.100-preview3-009430 [/usr/local/share/dotnet/sdk]
  2.2.100 [/usr/local/share/dotnet/sdk]
  3.0.100-preview-009812 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview-18579-0056 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0-preview3-27014-02 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview-27122-01 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

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

VS Code version: 1.29.1

C# Extension version: 1.17.1

Steps to reproduce

mkdir consoleapp22
mkdir consoleapp30
cd consoleapp22
dotnet new global
  • Edit the global.json file to specify the .NET Core 2.2.100 version.
dotnet new razor
code .
  • Open program.cs and put a breakpoint in main.

  • Press F5 to launch the debugger

  • Click the “yes” button when prompted to add stuff to project

  • Select “.NET Core” from the command pallette

  • Press F5 to launch the debugger

  • Debugger stops at breakpoint

    worksin22
  • Allow app to exit

  • Close VS Code

cd ../consoleapp30
dotnet new razor
code .
  • Open program.cs and put a breakpoint in main.
  • Press F5 to launch the debugger
  • Click the “yes” button when prompted to add stuff to project
  • Select “.NET Core” from the command pallette
  • Press F5 to launch the debugger

Expected behavior

The debugger stops at the breakpoint in main in program.cs.

Actual behavior

Debugger never stops at breakpoint.

noworksin30

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
gregg-miskellycommented, Dec 8, 2018

I found the problem. With .NET Core 3.0 on OSX, the CoreCLR debugging APIs are behaving in a way that they haven’t before, and the VS Debugger isn’t happy with it. I am working with the CoreCLR team to decide if we should fix VS to be tolerant of this behavior, or if this is a CoreCLR bug.

1reaction
gregg-miskellycommented, Dec 7, 2018

Thanks for the report! We will have a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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