---
description: >-
  Testing Windows Native C++ crashes with the sample application
  ‘myConsoleCrasher’
---

# myConsoleCrasher (C++)

Before you enable your native Windows application with BugSplat technology, you may want to take a moment to experiment with our `myConsoleCrasher` sample application.

To get started, download the BugSplat Microsoft Windows Native C++ SDK from the [Downloads](https://www.bugsplat.com/docs/sdk/) page. Once the contents of `BugSplatNative.zip` have been extracted, navigate to the `samples` folder and open the `myConsoleCrasher.vcxproj` file with Visual Studio.

1. Open myConsoleCrasher.vcxproj with Visual Studio 2019+&#x20;
2. Define values for `BUGSPLAT_DATABASE`, `APPLICATION_NAME`, and `APPLICATION_VERSION` in MyConsoleCrasher\MyConsoleCrasher.h
3. Create a Client ID and Client Secret pair for your BugSplat database on the [Integrations](https://app.bugsplat.com/v2/settings/database/integrations) page
4. Create a file `MyConsoleCrasher\Scripts\env.ps1` and populate it with the following (being sure to substitute your `{{id}}` and `{{secret}}` values from the previous step):

```
$BUGSPLAT_CLIENT_ID = "{{id}}"
$BUGSPLAT_CLIENT_SECRET = "{{secret}}"
```

5. Check the permissions of MyConsoleCrasher\Scripts\SendPdbs.ps1.  Make sure this file is not blocked for execution.

<figure><img src="https://976110677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LBMgmIcgkIXSUfnXDSv%2Fuploads%2FRxF0Dv50SMIAWcC9L5En%2Fimage.png?alt=media&#x26;token=dfa6035c-d6c0-4b34-8dec-2be6d303a16a" alt="" width="375"><figcaption></figcaption></figure>

6. 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:

![BugSplat Crash Dialog](https://976110677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LBMgmIcgkIXSUfnXDSv%2Fuploads%2Fgit-blob-462897bd3243aab778a04e1b6f671a64908fb73c%2Fbugsplat-crash-dialog%20\(2\)%20\(2\)%20\(2\)%20\(2\)%20\(2\)%20\(2\)%20\(2\)%20\(2\)%20\(2\)%20\(2\)%20\(3\)%20\(2\)%20\(1\)%20\(2\).png?alt=media)

Enter some descriptive text to help you identify the crash you are about to upload.  Click the `Send Error Report` button, and voilà!  The report will be sent! On the BugSplat website, look for the crash report with the description you entered.

Finally, experiment with other features of the library by examining the `myConsoleCrasher` source code and supplying different command-line arguments.

## Further Information

{% content-ref url="myconsolecrasher-c-plus-plus/address-sanitizer-reports" %}
[address-sanitizer-reports](myconsolecrasher-c-plus-plus/address-sanitizer-reports)
{% endcontent-ref %}
