You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR add a second custom visualizer sample to show how to support child nodes and evaluating expressions in a custom visualizer.
This sample visualizes a struct like:
```cpp
struct Sample
{
std::vector<int> a;
std::vector<int> b;
};
Sample sample;
```
which is by default visualized with a format similar to:
```
sample
-- a
---- a[0]
---- a[1]
---- ...
-- b
---- b[0]
---- b[1]
---- ...
```
as an array like:
```cpp
struct Temp
{
int a;
int b;
}
std::vector<Temp> sample;
```
which has a format similar to:
```
sample
-- sample[0]
---- a
---- b
-- sample[1]
---- a
---- b
...
```
This directory contains an example C/C++ Custom Visualizer.
3
+
4
+
## What is a Custom Visualizer?
5
+
The Visual Studio C/C++ Expression Evaluator allows customization of the display of variables in
6
+
the debugger based on the type of that variable (example: change the way CExampleClass variables
7
+
are displayed) using .natvis files. Natvis files add rules to format a type either declaratively or
8
+
by running custom code in the debugger. This custom code is called a Custom Visualizer. Most of
9
+
the time it is easier and much less error prone to use the declarative approach. But
10
+
Custom Visualizers are useful when formatting a type is too complicated to be done declaratively.
11
+
12
+
Natvis documentation can be found on [docs.microsoft.com](https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects).
13
+
14
+
## How to use this sample
15
+
More information about this sample can be found in the [Wiki for this project](https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/Cpp-Custom-Visualizer-Sample).
0 commit comments