Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix VS issue with unhandled exception on secondary threads (#103425)
* Fix VS issue with unhandled exception on secondary threads When "just my code" is disabled, unhandled exceptions on secondary threads cause the VS to stop without any stack trace shown. This is similar to the recently fixed problem that was happening with user unhandled exception treatment. The exception is rethrown as native exception after leaving the last managed frame and it propagates to the `ManagedThreadBase_DispatchOuter` where it is caught. The debugger gets notified from there, but all of the managed stack frames are gone at that point, so the debugger cannot show them. The fix is to report exception on a secondary thread as unhandled earlier, right in the SfiNext where we report it for the primary threads. The secondary thread is different in having the DebuggerU2MCatchHandlerFrame on stack while in the primary thread case, there is no explicit frame. Close #103385 * Modify the check for DebuggerU2MCatchHandlerFrame We need to check that it is also the topmost frame --------- Co-authored-by: Jan Kotas <jkotas@microsoft.com>
- Loading branch information