Closed sambauwens closed 5 years ago
You can change the debugger settings to break when the exception happens https://docs.microsoft.com/en-us/visualstudio/debugger/managing-exceptions-with-the-debugger?view=vs-2017
What if we called Debugger.Break() for caught exceptions if the debugger was attached?
We won't be making any changes here. You can create a middleware to do a Debugger.Break with the try catch block.
When I'm debugging my server code, I like to break on unhandled exceptions right into context. I noticed that when debugging my aspnet core application it never breaks in my code.
The last line of my stacktrace is :
I did some research, and noticed HttpProtocol.ProcessRequestsAsync() does seem to catch all exceptions unconditionnally.
So I would appreciate a configuration option that I set when the debugger is attached and which tells kestrel not to catch exceptions.