It showed how to debug nasty crashes within WinUI/WASDK where the exception raised contains no helpful error code and no call stack. Unfortunately, within the video the screen sharing didn't properly work, so we were partially unable to see which steps were taken.
Therefore I would like to request the steps to be documented, so Google Bing (and AI models 😊) can index this information more easily.
In the meantime, I will document the steps here as well:
Ensure Microsoft public symbols server is enabled in Visual Studio Options -> Debugging -> Symbols
Ensure Source Link & Source Server is enabled in Visual Studio Options -> Debugging -> General (not mentioned in the video!)
Enable native debugging in project debug properties
Debug the project
Go to the "Breakpoints" tab in the lower Visual Studio pane
Add "New Function Breakpoint"
Enter "Microsoft.ui.xaml.dll!OnFailureEncountered" and select C++
Click OK
Restart debugging, and now your debugger will break early in C++ code which allows you to inspect the call stack and find the line of code that threw the error
In the WinUI community call March 6, 2024 @Scottj1s presented "Crash debugging in 1.5". https://www.youtube.com/live/uFgGhNGlPm4?t=1035
It showed how to debug nasty crashes within WinUI/WASDK where the exception raised contains no helpful error code and no call stack. Unfortunately, within the video the screen sharing didn't properly work, so we were partially unable to see which steps were taken.
In https://github.com/microsoft/microsoft-ui-xaml/discussions/9361#discussioncomment-9288079 I have asked whether the steps could be documented in a blog post/docs page. While it was promised, unfortunately it didn't happen yet.
Therefore I would like to request the steps to be documented, so
GoogleBing (and AI models 😊) can index this information more easily.In the meantime, I will document the steps here as well: