MyConsoleCrasher (C++)
Testing Windows Native C++ crashes with the sample application 'MyConsoleCrasher'
Before you enable BugSplat in your Windows C++ application, you may want to take a moment to experiment with our MyConsoleCrasher sample application.
To get started, download the BugSplat SDK for Windows by clicking here. Download and unzip the contents of BugSplat.zip. After extracting the downloaded SDK, open the MyConsoleCrasher.sln file with Visual Studio.
Open
MyConsoleCrasher.slnwith Visual Studio 2022+Define values for
BUGSPLAT_DATABASE,APPLICATION_NAME, andAPPLICATION_VERSIONinSamples\MyConsoleCrasher\MyConsoleCrasher.hCreate a Client ID and Client Secret pair for your BugSplat database on the Integrations page
Create a file
Samples\MyConsoleCrasher\Scripts\env.ps1and populate it with the following (being sure to substitute youryour-client-idandyour-client-secretvalues from the previous step):
$BUGSPLAT_CLIENT_ID = "your-client-id"
$BUGSPLAT_CLIENT_SECRET = "your-client-secret"Set the command-line arguments for the project to
/MemoryException, or one of the other supported arguments from the sample's source code, to test various crashes. To set the command-line arguments, right-click theMyConsoleCrasherproject and select Properties > Debugging > Command Arguments.

Rebuild the project and run it outside of the Visual Studio debugger (Ctrl+F5). This is important since the debugger interferes with the BugSplat library’s exception handling. You should see a dialog such as that shown below:

Enter some descriptive text to help you identify the crash you are about to upload. Click the
Send Error Reportbutton, and voilà! The report will be sent! In the BugSplat web app, look for the crash report with the description you entered.Navigate to the BugSplat Dashboard and click the link in the ID column to view details about your crash, including the full symbolicated stack trace and various crash metadata.
Finally, experiment with other features of the library by examining the MyConsoleCrasher source code and supplying different command-line arguments.
Additional Info
Address Sanitizer ReportsLast updated
Was this helpful?
