dotnet / runtime

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

Issues with the new .NET 9+ Mono Debugger #109067

Open dlemstra opened 1 month ago

dlemstra commented 1 month ago

Description

We have a big application that executes .NET code in the browser with WASM. We are now testing with net9.0-rc2 to check if upgrading would resolve an out of memory issue. But with this upgrade we are running into other issues. One of these issues is that the new .NET 9+ Mono Debugger doesn't work with our application. The breakpoints that we set in our code are never hit when we use the new debugger. When the debugger is disabled the breakpoints work again. I have not successfully been able to reproduce our situation but I was able to to find an issue that might be the cause that the new debugger doesn't work for us.

Reproduction Steps

Our application uses Angular and when debugging locally we proxy /path to the .NET application that is running with a debugger attached. I have recreated that situation with a Yarp proxy in the following project: DebugIssue.zip

This project contains .slnLaunch.user to make sure both application start when debugging is started. Once the website (http://localhost:8000/test-debug) is show do the following:

Expected behavior

Breakpoints work.

Actual behavior

Breakpoints are not always working.

Regression?

No response

Known Workarounds

No response

Configuration

9.0.100-rc.2.24474.11 Visual Studio 2022 Preview (17.20.0 Preview 3.0)

Other information

No response

ScottNorton commented 4 weeks ago

Have you ensured the inspectUri is set in launchSettings.json? I've noticed issues loading breakpoints using Kestrel for the debugging host instead of IIS. IIS, with inspectUri set correctly has the browser link working properly for me in my project: https://www.voxelml.com/

launchSettings.json Edited this for you to attempt an IIS launch, try it out