Portable PDB (Program Database) files in .NET are a modern, cross-platform alternative to traditional Windows PDB files used for debugging. They store debugging information, such as source code line numbers, variable names, and metadata, in a more compact and efficient format. Portable PDBs are designed to work across different operating systems and platforms, making them ideal for cross-platform .NET applications.
You can upload your application's Portable PDB files directly to Raygun. We will automatically detect any stack traces that can be symbolicated using the uploaded PDB's. This process enhances the stack trace information, providing you with more detailed insights into your application's runtime behavior and making it easier to debug issues.
It's important to note that every time you build a release of your application, you'll need to upload the newly generated PDB file if you want more information in the stack traces from that build. Raygun is most valuable when your application is in production and being used by customers, rather than while debugging. So you generally only need to upload PDB files for builds of your application that get released to your customers.
API endpoint
The recommended way of uploading the PDB files to Raygun is by automating a POST to the API endpoint. Below are examples of uploading a PDB file using cURL and different authentication methods. Each needs to be substituted (including the angle brackets) with your own value as described below each code example.
Basic authentication
curl -L
-H "Authorization: Basic <BASIC_AUTH_TOKEN>"
-F "SymbolFile=@<PATH_TO_PDB_FILE>"
https://app.raygun.com/upload/pdbsymbols/<RAYGUN_APPLICATION_ID>
BASIC_AUTH_TOKEN
can be generated by taking your Raygun account credentials in the format username:password and then using the base 64 encoded result.
PATH_TO_PDB_FILE
is an absolute or relative path to your PDB file including the file name and .pdb extension.
RAYGUN_APPLICATION_ID
is available in the URL of Raygun when viewing your application data.
External access token
curl -L
-F "SymbolFile=@<PATH_TO_PDB_FILE>"
https://app.raygun.com/upload/pdbsymbols/<RAYGUN_APPLICATION_ID>?authToken=<EXTERNAL_ACCESS_TOKEN>
PATH_TO_PDB_FILE
is an absolute or relative path to your PDB file including the file name and .pdb extension.
RAYGUN_APPLICATION_ID
is available in the URL of Raygun when viewing your application data.
EXTERNAL_ACCESS_TOKEN
can be obtained from Raygun by clicking your name in the top right corner, select "My settings" and then hit "Generate external access token" or copy it if you already have one.
Additional options
If the upload is clearly not working, add the verbose -v
option to get more information about what's wrong.
curl -v
-L
-F "SymbolFile=@<PATH_TO_PDB_FILE>"
https://app.raygun.com/upload/pdbsymbols/<RAYGUN_APPLICATION_ID>?authToken=<EXTERNAL_ACCESS_TOKEN>
Possible results
200 if the upload was successful.
302 if you don't provide any form of authentication.
401 if credentials are incorrect, or you don't have access to the application.
404 if the URL or app id is incorrect.
curl (26) if the path to the PDB file is incorrect.
Manual upload
A drag and drop zone is available in the Raygun web application for manually uploading PDB files. This can be found by first visiting the desired application in your Raygun account, selecting "Application settings" from the side menu, and then clicking "Symbol center".
Managing your uploaded PDB files
Regardless of how you upload your PDB files, they will all be listed in the Symbol Center as seen in the image above. Each listed PDB file includes a button to delete the file which is useful if you upload the wrong PDB or want to tidy up old files.