View Application Insights Snapshot Debugger data
Snapshots appear as Exceptions in the Application Insights pane of the Azure portal. View debug snapshots in the portal to examine the call stack and inspect variables at each call stack frame.
For a more powerful debugging experience with source code, open snapshots with Visual Studio Enterprise. You can also set SnapPoints to interactively take snapshots without waiting for an exception.
Prerequisites
Snapshots might include sensitive information. You can only view snapshots if you are assigned the Application Insights Snapshot Debugger
role.
Access debug snapshots in the portal
After an exception has occurred in your application and a snapshot is created, you can view snapshots in the Azure portal within 5 to 10 minutes.
In your Application Insights resource, select Investigate > Failures from the left-side menu.
In the Failures pane, select either:
- The Operations tab, or
- The Exceptions tab.
Select the [x] Samples in the center column of the page to generate a list of sample operations or exceptions to the right.
From the list of samples, select an operation or exception to open the End-to-End Transaction Details page. From here, select the exception event you'd like to investigate.
- If a snapshot is available for the given exception, select the Open debug snapshot button in the right pane to view the Debug Snapshot page.
- If you do not see this button, no snapshot may be available. See the troubleshooting guide.
In the Debug Snapshot page, you see a call stack with a local variables pane. Select a call stack frame to view local variables and parameters for that function call in the variables pane.
Download snapshots to view in Visual Studio
To view snapshots in Visual Studio 2017 Enterprise or greater:
Click the Download Snapshot button in the Debug Snapshot page to download a
.diagsession
file, which can be opened by Visual Studio Enterprise.In Visual Studio, make sure you have the Snapshot Debugger Visual Studio component installed.
- For Visual Studio 2017 Enterprise and greater: The required Snapshot Debugger component can be selected from the Individual Component list in the Visual Studio installer.
- For a version older than Visual Studio 2017 version 15.5: Install the extension from the Visual Studio Marketplace.
Open the
.diagsession
file. The Minidump Debugging page in Visual Studio appears.Click Debug Managed Code to start debugging the snapshot. The snapshot opens to the line of code where the exception was thrown.
The downloaded snapshot includes any symbol files found on your web application server. These symbol files are required to associate snapshot data with source code. For App Service apps, make sure to enable symbol deployment when you publish your web apps.
Next steps
Enable the Snapshot Debugger in your: