-
Notifications
You must be signed in to change notification settings - Fork 2
Home
A periscope is an instrument for observation over, around or through an object, obstacle or condition that prevents direct line-of-sight observation from an observer's current position. (Wikipedia)
Visual Studio provides an API that enables writing custom visualizers for specific types. The custom visualizer can focus on a specific object which exists in the debuggee side, and bring certain parts into better focus on the debugger side.
This project provides a common framework for custom debugging visualizers for Visual Studio. It currently provides the following:
- A VisualizerBaseWindow that manages the "pass object to debuggee using TransferObject / handle returned object in debugger" cycle
- CopyWatchExpression command
- Enables reuse of the same UI components outside of a visualizer
- Persistence of window state between debug sessions; individual properties can be associated with generated key, such as the assembly name
- Latest version checking
- Exception handling on the debuggee side
with the following planned features:
- Access to more detail about the current source-code debugging environment, such as the source expression or the language of the source file.
- Theming, with light, dark or VS modes (in which theme information is taken from VS)
This framework will be used in the following visualizers:
Visualizer | Targets | Project status | Usage of Periscope |
---|---|---|---|
Expression Tree Visualizer | Expression trees etc. | Available | Complete |
ANTLR Parse Tree Visualizer | ANTLR parse treesstring
|
Available | Complete |
Type hierarchy visualizer | System.Type |
Planned | Pending |
Roslyn Syntax Node visualizer | Roslyn syntax nodes | Planned | Pending |
DateTime visualizer | System.DateTime |
Available | Complete |
Periscope.Demo | System.Random |
Available | Complete |
The source code in this repo and in the Periscope.Debuggee repo is intended to be consumed as a Git submodule of the parent visualizer's repo, for a number of reasons.
In order to target frameworks other than .NET Framework, you need to create two projects -- one to be injected into the debuggee process, and the other to be run in the context of Visual Studio. Run the following command in the folder of the debuggee-side project:
git submodule add https://github.com/zspitz/Periscope.Debuggee.git
and the following command in the folder of the debugger-side project:
git submodule add https://github.com/zspitz/Periscope.git
These commands create Git submodules containing the source code from Periscope.Debugge and Periscope respectively.
Note that the visualizer API allows you to target one or more of the following framework sets:
- .NET Framework >= 2.0
- .NET Standard >= 2.0
- .NET Core >= 1.0
However, Periscope's assembly loader only supports .NET Core >= 2.0. If there's a need we can make it conditionally available only for .NET Standard and .NET Framework.