Can debug 2.2 apps, but not 3.0 apps on macOS and (some?) Linux
See original GitHub issueEnvironment 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 inmain
. -
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
-
Allow app to exit
-
Close VS Code
cd ../consoleapp30
dotnet new razor
code .
- Open
program.cs
and put a breakpoint inmain
. - 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.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Thanks for the report! We will have a look.