Why is Visual Studio 2022 not highlighting my code when an Unhandled Exception is thrown?

43 Views Asked by At

When an unhandled exception is thrown in one of my MVC projects, I just get the diagnostic webpage and the debugger does not break at the troublesome line of code.

For example, in my older MVC projects, if I type the line:

throw new Exception()

then the application pauses and the line is highlighted. But in my newer .NET 7 project I just get a diagnostic web page but the line of code is not identified which makes debugging ten times harder.

I guess I must have changed a setting somewhere but I don't know how to fix it.

Thanks

0

There are 0 best solutions below