|
| 1 | +--- |
| 2 | +title: VisualStudio.Extensibility Diagnostics Explorer extension overview |
| 3 | +description: VisualStudio.Extensibilityo Diagnostics Explorer extension |
| 4 | +author: RyanToth3 |
| 5 | +ms.author: rytoth |
| 6 | +monikerRange: ">=vs-2022" |
| 7 | +ms.subservice: extensibility-integration |
| 8 | +ms.topic: overview |
| 9 | +ms.date: 05/09/2024 |
| 10 | +--- |
| 11 | + |
| 12 | +# Overview |
| 13 | + |
| 14 | +The VisualStudio.Extensibility Diagnostics Explorer extension is designed to help debug VisualStudio.Extensibility extensions while developing them. The target audience for this extension is extension authors, not extension consumers. This extension provides an interface for inspecting the extensibility points that extensions are interacting with, and what configuration objects extensions are providing to the IDE, and the metadata of those configuration objects. |
| 15 | + |
| 16 | +## Get Started |
| 17 | + |
| 18 | +Follow these instructions to install, launch, and configure the Diagsnotics Explorer. |
| 19 | + |
| 20 | +### Install the Extension |
| 21 | + |
| 22 | +You can get the Diagnostics Explorer either directly through the Extension Manager in Visual Studio, or from the Visual Studio Marketplace [here](https://aka.ms/VisualStudio.Extensibility/DiagnosticsExplorer). |
| 23 | + |
| 24 | +> [!NOTE] |
| 25 | +> The VisualStudio.Extensibility Diagnostics Explorer extension is compatable with Visual Studio 2022 17.10 and higher. |
| 26 | +
|
| 27 | +### Open the Diagnostics Explorer in Visual Studio |
| 28 | + |
| 29 | +To launch the Diagnostics Explorer in Visual Studio, select **VisualStudio.Extensibility Diagnostics Explorer** in the **Extensions** menu. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +### Enable collection of diagnostics |
| 34 | + |
| 35 | +The Diagnostics Explorer is configured to collect relevant diagnostic data from your extensions by default. If you want to disable or re-enable this data collection, you can toggle the **Enable collecting diagnostics** checkbox at the lower-left corner of the tool window. A restart of Visual Studio is required for any changes to this setting to take effect. |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +## Diagnostics Pages |
| 40 | + |
| 41 | +The left-hand panel of the Diagnostics Explorer tool window contains a list different *feature pages*. These pages correspond to the extensible features for which you can find diagnostic information about the components and configurations that Visual Studio discovered from your extensions. For example, you can select **Commands** to view diagnostics related to your commands, command sets, menus and toolbars, placements, and more. |
| 42 | + |
| 43 | +Also in the list are two special pages that aren't directly related to any components in your extension: [**Events**](#events-page), a live viewer for extensibility-related events, and [**Activation Constraints**](#activation-constraints-page), which shows relevant IDE state to help you craft your activation constraints. |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +### Extensible Feature Pages |
| 48 | + |
| 49 | +Extensible feature pages have a ComboBox in the top-left for the different **Extensibility Points** in that feature area, each of which can be mapped directly to configuration objects in your extension. For example, in the **Commands** page there's an **Extensibility Point** for **Menus and Toolbars**, which shows you each of the menus and toolbars that Visual Studio discovered in your VisualStudio.Extensibility extensions. |
| 50 | + |
| 51 | +The data updates in real time as properties are updated in extensions. For example, if an extension changes the display name of one of its commands at runtime, the new display name of that command is shown in the cell in the **Display Name** column for that command immediately. |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +The **Extensibility Point** ComboBox also has an item called **Log**, which shows you a live view of those updates. The **Clear All** button beside the ComboBox can be used to clear all lines currently being displayed in the view. |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +You can filter the items in the view by using the **Extensions** ComboBox. When **All** is selected in this ComboBox, data for every installed VisualStudio.Extensibility extension is shown. If you change this ComboBox to the ID of a specific extension, only items related to that specific extension are shown. The value of this ComboBox is persisted even when you navigate between extensible feature pages. |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +Some cells in the DataGrid display **[Click to Expand]**. This message means that the metadata related to that property is too verbose to be neatly displayed in a cell of the DataGrid. Clicking on the cell opens a modal dialog displaying the actual value of that cell. |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +### Events Page |
| 68 | + |
| 69 | +The events page shows you when "something happens" in the IDE. Each event appears as a new row in the DataGrid, along with any properties related to that event. For example, when a command is executed, a **Commands - Executing** event appears in the view showing the ID of the extension that the command belongs to and the ID of the command that was executed. |
| 70 | + |
| 71 | +You can use the **Event** ComboBox to filter the view to only contain events with a specific name. When **All** is selected, then all events are shown. If a specific event is selected, all of the properties of the event are shown in the view. Some properties need to be expanded by clicking on **[Click to Expand]** if they're too verbose to be shown in a single cell. |
| 72 | + |
| 73 | +The **Contract** ComboBox filters the view to only show events related to a specific extensible feature. It also filters the `Event` ComboBox to only contain the names of events related to the specific extensible feature. |
| 74 | + |
| 75 | +Clicking the **Clear All** button deletes all the events currently shown in the view. |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | +#### Column Descriptions |
| 80 | + |
| 81 | +##### Extension ID |
| 82 | + |
| 83 | +The **Extension Id** column shows the ID of the extension that the instance of the event is related to. It's possible for this cell to be empty for some events if they don't belong to a specific extension but instead apply to the IDE as a whole. |
| 84 | + |
| 85 | +##### Item ID |
| 86 | + |
| 87 | +The **Item Id** column shows the ID of the extension item that the instance of the event is related to. For example, the **Item Id** for the **Commands - Executing** event would be the ID of the command that was executed. |
| 88 | + |
| 89 | +##### Properties |
| 90 | + |
| 91 | +The **Properties** column shows the set of properties related to that instance of the event that could be displayed in a single cell in a DataGrid. More verbose properties would only be visible from the **More Info** dialog, or by changing the **Event** ComboBox to the name of the specific event that you're interested in. |
| 92 | + |
| 93 | +##### More Info |
| 94 | + |
| 95 | +The **More Info** column displays more verbose metadata related to an event. Clicking a cell in this column opens a modal dialog containing all of the metadata related to the event represented by that row. |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | +### Activation Constraints Page |
| 100 | + |
| 101 | +The activation constraints page shows the state of various properties related to the IDE itself. The **Context** ComboBox changes the data in the view to either show all of the activation constraints related to the currently selected item in the **Acitvation Constraints** ComboBox, or a log of all the times these properties changed since the tool window was opened. When the **Events** context is selected, the **Clear All** button can be used to delete all the events currently being displayed in the view. |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
0 commit comments