|
| 1 | +--- |
| 2 | +description: "PerfView is a tool that creates ETL (event trace log) files based on Event Tracing for Windows) that can be useful in troubleshooting some kinds of issues with Visual Studio." |
| 3 | +title: Collect an ETL trace with PerfView and create minidumps with all call stacks |
| 4 | +ms.date: 10/11/2021 |
| 5 | +ms.topic: how-to |
| 6 | +helpviewer_keywords: |
| 7 | + - "perfview" |
| 8 | + - "ETL Trace" |
| 9 | + - minidumps for Visual Studio issues" |
| 10 | +author: corob-msft |
| 11 | +ms.author: corob |
| 12 | +manager: jmartens |
| 13 | +ms.technology: vs-ide-general |
| 14 | +dev_langs: |
| 15 | + - CSharp |
| 16 | + - VB |
| 17 | + - CPP |
| 18 | +ms.workload: |
| 19 | + - "multiple" |
| 20 | +ms.description: "Collect ETL traces using perfview.exe and create minidumps to send to Microsoft, for troubleshooting issues with Visual Studio" |
| 21 | +--- |
| 22 | +# Collect an ETL trace with PerfView and create minidumps with all call stacks |
| 23 | + |
| 24 | +When you report a problem with Visual Studio, the Microsoft product team might ask for an ETL trace or minidumps to collect additional information for troubleshooting. Use the following steps to collect an ETL trace or to create minidumps for all call stacks. |
| 25 | + |
| 26 | +## Collect an ETL trace with PerfView |
| 27 | + |
| 28 | +PerfView is a tool that creates ETL (event trace log) files based on [Event Tracing for Windows](/windows/desktop/ETW/event-tracing-portal) that can be useful in troubleshooting some kinds of issues with Visual Studio. Occasionally when you report a problem, the product team might ask you to run PerfView to collect additional information. |
| 29 | + |
| 30 | +### Install PerfView |
| 31 | + |
| 32 | +Download PerfView from [GitHub](https://github.com/Microsoft/perfview/blob/master/documentation/Downloading.md). |
| 33 | + |
| 34 | +### Run PerfView |
| 35 | + |
| 36 | +1. Right-click on **PerfView.exe** in Windows Explorer and choose **Run as administrator** as admin. |
| 37 | +1. On the Collect menu, choose **Collect**. |
| 38 | +1. Check **Zip**, **Merge**, and **ThreadTime**. |
| 39 | +1. Increase **Circular MB** to 1000. |
| 40 | +1. Change **Current Dir** to save ETL traces to a specified folder and Data File if you are going to collect more than once. |
| 41 | +1. To start recording data, choose the **Start Collection** button. |
| 42 | +1. To stop recording data, choose the **Stop Collection** button. The PrefView.etl.zip file will be saved in the specified directory. |
| 43 | + |
| 44 | +PerfView can store only the most recent data that fits into its buffer. Therefore, try to stop the collection as soon as possible after Visual Studio starts to freeze or slow down. Don't collect for more than 30 seconds after you hit a problem. |
| 45 | + |
| 46 | +For more information, see [PerfView Tutorial on Channel9](https://channel9.msdn.com/Series/PerfView-Tutorial/PerfView-Tutorial-1-Collecting-data-with-the-Run-command). |
| 47 | + |
| 48 | +## Create minidumps for a Visual Studio process with all call stacks |
| 49 | + |
| 50 | +In some cases, Microsoft might ask for a minidump of a running Visual Studio process with information for all call stacks. To collect this information, perform these steps: |
| 51 | + |
| 52 | +### Create the minidump file |
| 53 | + |
| 54 | +1. Start a new instance of Visual Studio. |
| 55 | +1. From the main menu, choose **Debug** > **Attach To Process**. |
| 56 | +1. Check the relevant **Managed** and **Native** check boxes and press **Attach**. |
| 57 | + |
| 58 | +  |
| 59 | + |
| 60 | +1. Select the other Visual Studio instance to attach to from the list of running processes. |
| 61 | +1. From the main menu, choose **Debug** > **Break All**. |
| 62 | +1. From the main menu, choose **Debug** > **Save Dump As**. |
| 63 | + |
| 64 | +### Get the call stacks from the minidump |
| 65 | + |
| 66 | +1. Open the dump file in Visual Studio. |
| 67 | +1. Go to **Tools** > **Options** > **Debugging** > **Symbols** and make sure that **Microsoft Symbol Servers** is checked in the **Symbol file (.pdb) locations**. |
| 68 | +1. Open the **Command** window (**View** > **Other Windows** > **Command Window**). |
| 69 | +1. Type ‘~*k’. The window displays all threads' call stacks. |
| 70 | +1. Copy all text from Command Window and save to a text file. |
| 71 | +1. Attach the txt file to the bug. |
0 commit comments