GDE Overview
Mathwrist User Guide Series
Abstract
This document gives a high level overview of using Mathwrist’s Graphical Debugging Extension (GDE) tool for scientific visualization in Microsoft Visual Studio IDE while developing C++ numerical programs. More detailed information can be found in subsequent user guide series by feature chapters.
1 Introduction
Mathwrist’s Graphical Debugging Extension (GDE) product is a C++ debugging extension tool for Microsoft Visual Studio 2022 community, professional and enterprise editions. It allows scientists and engineers to directly view data and math objects while performing C++ numerical programming or prototyping tasks. By rendering scientific plots inside the Visual Studio IDE, users can obtain immediate visual feedback along the course of developing and refining their algorithms or mathematical models.
GDE is published to Visual Studio Extension Marketplace. Users can download the software from the marketplace, or directly install it under Visual Studio menu Extensions

Mathwrist uses a standard Windows software installer to deploy a license activation application and its C++ numerical programming library (NPL) product to user’s desktop. GDE and NPL use the same license activation application to generate a node-locked license file. This software installer will be available for download from Mathwrist website Pricing
2 Plottable Data Types
By default, C++ native double static array and std::vector
Let
3 Plot Window
After a successful installation of the GDE package, GDE will register a menu item to Visual Studio IDE, under the path Views
Like other Visual Studio tool windows, GDE plot window can be docked within the standard IDE layout panel, or can be undocked as a floating window at a convenient location on the screen. In the demo example of figure 3, we have docked the GDE plot window side by side to the source code editor, tabbed together with other Visual Studio debugging windows, i.e. callstack, output windows.


4 Settings
The red rectangle area in figure 3 is a group of GDE control buttons, ,
,
and
from top to bottom respectively. Moving the mouse over these buttons, we can see a tool tip text block emerging to indicate the purpose of these buttons, “Documentation”, “Plot Settings”, “Clear Plot” and “3-d Zooming”. Initially, “3-d Zooming” button is disabled in gray color. When a 3-d plottable object is displayed in the plot window, this button will then be enabled to support zooming 3-d objects.
The “Plot Settings” button is used to customize display control parameters. It opens up a plot settings window illustrated in example figure 4. This settings window has 3 tabs “Curve Session”, ”Surface Session” and “Data Session” marked by a green rectangle in figure 4. Each tab allows users to set display control parameters and manage plottable components in the corresponding session.
When a plottable object is sent to the plot window for display, depending on the nature of this object, it will be cached in one of these three sessions. We shall call the session that is currently displayed in the plot window the “Active Session”. When the “Clear Plot” button is clicked, the display window and all components of the active session are cleared.

5 Object Bookkeeping
Plottable objects are bookkept by their unique names in each session. Within the same session, if two objects with the same variable name
What could be interesting to users is that, if the debuggee program stops at a break point where an object of name
It is important to keep in wind that at each break point, the plottable name
6 Session Management
As discussed earlier, clicking the “Plot Settings” button opens up a plot settings window that has “Curve”, “Surface” and “Data” three session management tabs. A full picture of this plot setting window within Visual Studio IDE is illustrated in figure 5. The left part of each tab, marked in a blue box area, contains controls that allow users to customize the display of that session. The right part of the tab, marked in a red box, contains a list of plottable components that have been added to the session. Right clicking a component name will trigger a context menu that allows users to delete this component from the current session, or display the component in applicable alternative plot types. We will discuss more session-specific details in subsequent GDE user guide series.

7 Plottable Specification File
By default, std::vector
Each time when GDE is loaded to Visual Studio, it searches for a json file “mathwrist.gde.spec.json” under the Windows user profile directory. This directory has environment variable name “USERPROFILE” in Windows 10 and 11, which points to “C:
7.1 Vector Types
In this section and the next “Matrix Types” section, we will illustrate how to specify a user-defined data type by examples. First, please find the following C++ code Listing 1 from the demo.h header file in the “GdeDemo” project that we shipped together with GDE installation.
This simple buffer class stores dynamically allocated memory to its class member m_data and the number of elements to member m_size. The corresponding json specification of this buffer class starts from line 3 to line 7 in code Listing 2. Keyword “Vectors” at line 2 tells GDE that this specification block contains a list of vector types. Each open/close bracket {…} in between [ and ] is a single vector-type specification.
The keyword “TypeName” at line 4 indicates that the exported vector type is called mathwrist::GDEDemo::Buffer. Note that namespace “mathwrist” and outer class name “GDEDemo” are all required in order to correctly refer to the given type. Keyword “MemberSize” at line 5 indicates the vector size is stored in class/struct data member m_size. And finally keyword “MemberPointer” at line 6 indicates the vector data storage pointer is m_data.
Alternatively, a vector type specification can provide the class/struct member name of the one-beyond-last element instead of specifying the vector size. This is illustrated from line 8 to line 12 for std::vector
7.2 Matrix Types
In the same demo.h header file, we also provided a C++ matrix class definition that uses std::vector as data storage. The complete code example is included in Listing 3. Its json specification is given in Listing 4.
Here, keyword “ConsecutiveMatrices” tells GDE that this specification block is to export matrix types that use consecutive memory storage. We have only one type in this block, which is mathwrist::GDEDemo::Matrix following the keyword “TypeName” at line 3.
Line 4 and 5 indicate the number of rows and columns are stored in class/struct data member m_rows and m_cols, after keywords “MemberRowSize” and “MemberColumnSize” respectively. At line 6, keyword “MemberPointer” tells GDE that the memory address of matrix element storage can be obtained by following the chain of data members m_storage._Mypair._Myval2._Myfirst.
Lastly, keyword “RowMajor” at line 7 is used to specify whether the matrix uses row-major or column-major memory storage. In this example, we tell GDE the row-major flag is stored in class/struct member m_row_wise. If this line is missing, by default we interpret the matrix uses row-major storage. Alternatively, users can specify key-value pairs “RowMajor”: “TRUE” or “RowMajor”: “FALSE” for matrix types that consistently use row-major or column-major storage.