-
Notifications
You must be signed in to change notification settings - Fork 26
Solution structure
The original architecture for debugging visualizers was a single DLL. But with the arrival of Visual Studio 2019, and debugging non-Framework .NET implementations (.NET Core, .NET Standard), a new architecture has been introduced. Visualizers are split into two DLLs:
- a debugger component, loaded into Visual Studio
- and a debuggee component, loaded into the process being debugged.
If the target of the debugging visualizer is serializable, then the two components can pass the target object between them via serialization and deserialization. For expression trees -- which are not serializable -- we have to introduce a set of wrapper classes which pass the necessary information between the two components.
In addition, we want to package the UI components -- views and viewmodels -- in a NuGet package, for reuse in other projects.
To sum up, there are three compilation units:
- debuggee component (Debuggee)
- debugger component (Visualizer)
- UI controls and viewmodels (Package)
There are also three shared projects:
- Serialization -- the serializable wrapper classes, which are used by all three compilation units
- UI -- shared UI components, used by Visualizer and Package
- Visualizer.Xaml -- the VisualizerWindow control written in XAML; SDK projects don't support XAML outside of .NET Core 3, but XAML in a shared project seems to work.
and two additional projects:
- PostBuild -- building this project will copy the built visualizer DLLs into the appropriate folders
- Tests.Visualizer -- unit tests on the view models
Project | Namespace(s) | Description |
---|---|---|
Debuggee | ExpressionTreeVisualizer | Debuggee component -- VisualizerDataObjectSource
|
Package | ExpressionTreeVisualizer | UI controls + viewmodels, as NuGet package (WIP) |
PostBuild | Post-build event which copies the output DLLs to the visualizer folder | |
Serialization | ExpressionTreeVisualizer.Serialization | Wrapper classes used by Debuggee and Visualizer to communicate with one another |
Tests.Visualizer | ExpressionTreeVisualizer.Tests | Automated tests |
UI | ExpressionTreeVisualizer | Views and viewmodels |
Visualizer.Xaml | ExpressionTreeVisualizer |
VisualizerWindow , written in XAML |
Visualizer | ExpressionTreeVisualizer | Debugger component |