VisualStudio.Extensibility Diagnostics ExplorerThe VisualStudio.Extensibility SDK is the modern way to create your extensions for Visual Studio. The VisualStudio.Extensibility Diagnostics Explorer is the best way to debug the extensions you create. This tool can help you answer questions like “why isn’t my command showing up where I expect it to be in the IDE?” or “why isn’t my extension being activated when I expect it to be?” To learn more about the VisualStudio.Extensibility Diagnostics Explorer, you can find our documentation here. To learn more about VisualStudio.Extensibility, please visit our SDK docs FeaturesThe VisualStudio.Extensibility Diagnostics Explorer can be used to view each of the extension components discovered by Visual Studio, to view live events, and to inspect the state of the IDE to help you create activation constraints. View component configurationVisualStudio.Extensibility has made it easier for you to configure your extensions by eliminating the need for you to manually maintain separate metadata files. With the Diagnostics Explorer, you can see exactly which extensions and components were discovered by Visual Studio, along with the configuration of each discovered item. For example, if you aren't seeing your command in the IDE, you can use the Command tab Diagnostics Explorer to view any commands that have been contributed to Visual Studio. If yours isn't present in the list, that’s a hint to double-check your configuration. If it’s present, but not enabled or visible, you may want to check your activation constraints. And if it’s marked as enabled and visible, you can use the dropdown menu to view command placements to make sure you’ve placed it correctly. Using the Commands tab, you can inspect commands, command sets, groups, menus and toolbars, command placements, and dynamic command anchors. Other tabs let you inspect components for other feature areas including tool windows, document types, text views, and more. As we add features in future releases, you’ll be able to inspect any new components alongside these in the Diagnostics Explorer. View live event logWe know that extension developers like you sometimes develop extensions that may need to handle events throughout the IDE , such as a command being executed, a tool window being opened, or a TextView being created, so we’ve added a live event viewer to enable you to observe these events and their properties in real time: View IDE state for client contextsThe Client Contexts tab in the Diagnostics Explorer gives you the current state for each of the values available to you when creating an activation constraint. Using this tab, you can get the IDE into the state that you want to use for your activation (such as building a project or opening a markdown file), and then you can inspect the values for each of the available expressions to help you create your constraint. For example, suppose you wanted a command to be visible only if there’s a C# file open in the editor. With the Diagnostics Explorer, you could open a C# file and use the Client Contexts tab to help you to determine which of the expressions you’ll need to craft your constraint:
How to launch the Diagnostics ExplorerOnce installed, the Diagnostics Explorer is found in the Extensions menu. Enable data collectionThe Diagnostics Explorer requires the collection of diagnostic data from various extension-related components. To enable or disable this data collection, use the checkbox at the lower-left corner of the tool window. To learn more, please visit our documentation here. |