docs/wiki/Reporting-Visual-Studio-crashes-and-performance-issues.md
This document provides specific guidance and best practices for reporting crashes and performance issues in Visual Studio by gathering heap dumps / performance traces as part of Visual Studio's built-in Report a Problem workflow. For a general overview of how to report problems in Visual Studio, see "How to Report a Problem with Visual Studio 2017".
:arrow_right: The product teams review all feedback submitted through the Report a Problem tool. Users are not required to follow the steps in this document to provide feedback.
This document describes the best known ways to report actionable product feedback, i.e. feedback for which the product team is most likely to diagnose and resolve quickly. It focuses on two categories of severe problems which are historically challenging to resolve.
:bulb: After identifying the case which best describes your issue, follow the feedback steps specific to that case.
Directly reproducible crashes are cases which have all of the following characteristics:
For these issues, follow the steps in "How to Report a Problem" and be sure to include:
:bulb: Most valuable feedback: For this case, the most valuable feedback is the set of steps to reproduce the issue along with sample source code.
If you're not sure what's causing your crashes or they seem random, then you can capture dumps locally each time Visual Studio crashes and attach those to separate feedback items. To save dumps locally when Visual Studio crashes, set the following registry entries:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\devenv.exe]
"DumpFolder"="C:\\Crashdumps"
"DumpCount"=dword:00000005
"DumpType"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\DevHub.exe]
"DumpFolder"="C:\\Crashdumps"
"DumpCount"=dword:00000005
"DumpType"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\ServiceHub.RoslynCodeAnalysisService.exe]
"DumpFolder"="C:\\Crashdumps"
"DumpCount"=dword:00000005
"DumpType"=dword:00000002
⚠️ Each dump file produced by this method will be up to 4GiB in size. Make sure to set DumpFolder to a location with adequate drive space or adjust the DumpCount appropriately.
Each time Visual Studio crashes, it will create a dump file devenv.exe.[number].dmp file in the configured location. If one of the helper processes crashes, it will create a dump file with the helper processes's name.
Then, use Visual Studio's "Report a Problem..." feature. It will allow you to attach the appropriate dump.
⚠️ Do not attach heap dumps to existing feedback items. Please create a new feedback item for each heap dump you would like to submit. If you were requested to provide a heap dump in order to resolve a previous feedback item, simply reply to the request with a link to the new feedback item where the heap dump is attached.
:bulb: Most valuable feedback: For this case, the most valuable feedback is the heap dump captured at the time of the crash.
When diagnosing performance issues, the goal is to capture a performance trace while performing the slow/hanging action.
:bulb: When possible, isolate each scenario in a separate, specific feedback report. For example, if typing and navigation are both slow, follow the steps below once per issue. This helps the product team isolate the cause of specific issues.
For best results in capturing the performance, follow these steps:
⚠️ Do not directly attach performance traces to existing feedback items on Developer Community website. Requesting/providing additional information is a supported workflow in Visual Studio's built-in Report a Problem tool. If a performance trace is required in order to resolve a previous feedback item, we will set the state of the feedback item to "Need More Info", which can be responded to in the same way as reporting a new problem. For detailed instruction, please refer to "Need More Info" section in Report a Problem tool's document.
:bulb: Most valuable feedback: For almost all performance issues, the most valuable feedback is a high-level description of what you were trying to do, along with the performance trace (*.etl.zip) which captures the behavior during that time.
Steps for manually recording performance traces using the PerfView tool can be found on the Recording performance traces with PerfView page.