dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.99k stars 4.67k forks source link

[NETSDKE2E] CoreFX symbols are missing while debugging IL Symbols on MacOS #96475

Closed v-xiaofchen closed 8 months ago

v-xiaofchen commented 8 months ago

Description

Environment Affected OS: MacOS Affected Build: VS Code: 1.85.1 from Download Visual Studio Code - Mac, Linux, Windows C# Extension version: v2.14.8 (latest release from the marketplace) CLI/SDK: 9.0.100-alpha.1.24053.14(runtime- 9.0.0-alpha.1.24053.1)from dotnet/installer: .NET SDK Installer (github.com)

Reproduction Steps

Testing on MacOS with VSCode Create a new ASP.NET Razor project by doing mkdir razor cd razor dotnet new razor Install VS code Launch VSCode and install the latest release C# extension. Use File -> Open Folder to open the razor folder you have created in step 1 It may ask at the bottom right to install assets to build and debug, say yes. After it has done this it will have created a .vscode directory in the ‘razor’ directory and a ‘launch.json’ file in that directory. Open the ‘.vscode’ directory, and double click on the ‘launch.json to edit it. Add the following lines after the “name” line of the “Configurations” object. (This allows debugging through the framework. "justMyCode": false, "symbolOptions": { "searchMicrosoftSymbolServer": true }, "suppressJITOptimizations": true,

Add the following line to the Program.cs file Console.WriteLine("x " + 3); Place a breakpoint on that line (F9).

Run the application until it hit that breakpoint (F5). It will load symbols from the Microsoft symbol server, and may take a few seconds to hit the breakpoint. You should see 20-30 lines of ‘Loaded XXX Symbols loaded’. Lines as it does this).

Step into the concatination method (F11).

Expected behavior

Expected behavior CoreCLR symbols are displayed in step13.

Actual behavior

CoreCLR symbols are missing in step13. MAC111

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

.NET SDK: Version: 9.0.100-alpha.1.24053.14 Commit: 48543d2076 Workload version: 9.0.100-manifests.916f9a05

Runtime Environment: OS Name: Mac OS X OS Version: 12.7 OS Platform: Darwin RID: osx-x64 Base Path: /usr/local/share/dotnet/sdk/9.0.100-alpha.1.24053.14/

.NET workloads installed: There are no installed workloads to display.

Host: Version: 9.0.0-alpha.1.24053.1 Architecture: x64 Commit: cc26196708

.NET SDKs installed: 9.0.100-alpha.1.24053.14 [/usr/local/share/dotnet/sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 9.0.0-alpha.1.23620.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 9.0.0-alpha.1.24053.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found: None

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

ghost commented 8 months ago

Tagging subscribers to this area: @tommcdon See info in area-owners.md if you want to be subscribed.

Issue Details
### Description Environment Affected OS: MacOS Affected Build: VS Code: 1.85.1 from [Download Visual Studio Code - Mac, Linux, Windows](https://code.visualstudio.com/download) C# Extension version: v2.14.8 (latest release from the marketplace) CLI/SDK: 9.0.100-alpha.1.24053.14(runtime- 9.0.0-alpha.1.24053.1)from [dotnet/installer: .NET SDK Installer (github.com)](https://github.com/dotnet/installer) ### Reproduction Steps Testing on MacOS with VSCode Create a new ASP.NET Razor project by doing mkdir razor cd razor dotnet new razor Install VS code Launch VSCode and install the latest release C# extension. Use File -> Open Folder to open the razor folder you have created in step 1 It may ask at the bottom right to install assets to build and debug, say yes. After it has done this it will have created a .vscode directory in the ‘razor’ directory and a ‘launch.json’ file in that directory. Open the ‘.vscode’ directory, and double click on the ‘launch.json to edit it. Add the following lines after the “name” line of the “Configurations” object. (This allows debugging through the framework. "justMyCode": false, "symbolOptions": { "searchMicrosoftSymbolServer": true }, "suppressJITOptimizations": true, Add the following line to the Program.cs file Console.WriteLine("x " + 3); Place a breakpoint on that line (F9). Run the application until it hit that breakpoint (F5). It will load symbols from the Microsoft symbol server, and may take a few seconds to hit the breakpoint. You should see 20-30 lines of ‘Loaded XXX Symbols loaded’. Lines as it does this). Step into the concatination method (F11). ### Expected behavior Expected behavior CoreCLR symbols are displayed in step13. ### Actual behavior CoreCLR symbols are missing in step13. ![MAC111](https://github.com/dotnet/runtime/assets/99376012/9fe10f9d-20c4-4fd4-9ea6-28d4bc989762) ### Regression? _No response_ ### Known Workarounds _No response_ ### Configuration _No response_ ### Other information dotnet --info .NET SDK: Version: 9.0.100-alpha.1.24053.14 Commit: 48543d2076 Workload version: 9.0.100-manifests.916f9a05 Runtime Environment: OS Name: Mac OS X OS Version: 12.7 OS Platform: Darwin RID: osx-x64 Base Path: /usr/local/share/dotnet/sdk/9.0.100-alpha.1.24053.14/ .NET workloads installed: There are no installed workloads to display. Host: Version: 9.0.0-alpha.1.24053.1 Architecture: x64 Commit: cc26196708 .NET SDKs installed: 9.0.100-alpha.1.24053.14 [/usr/local/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 9.0.0-alpha.1.23620.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 9.0.0-alpha.1.24053.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Other architectures found: None Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download
Author: v-xiaofchen
Assignees: -
Labels: `area-Diagnostics-coreclr`
Milestone: -
v-xiaofchen commented 8 months ago

Debug log please refer to Log.zip

tommcdon commented 8 months ago

Adding @hoyosjs for thoughts. This seems like a source link issue and not related to symbols.

hoyosjs commented 8 months ago

This is a source link issue. Most likely the hash of the document differs, or there was a commit id issue. I'll take a look at the source link blob to determine.

tommcdon commented 8 months ago

Hi @v-xiaofchen! I am not able to repro on my mac m1 with C# extension version v2.14.8, vs code version 1.85.1, .NET SDK version dotnet-sdk-9.0.100-alpha.1.24055.1 (screen capture below). Therefore I believe that both framework symbols and source link are working as expected in .NET. If you are still experiencing this issue, I suggest opening an issue against the C# extension.

image