Getting Started with the Debugger Visualizer

Start a new project, add a button to the form, double-click the button and write this code:

uses MtxVec, MtxExpr, MtxExprInt;

procedure TForm1.Button1Click(Sender: TObject);
var a: Vector;
    c: Matrix;
    str: string;
begin
    str := 'test';
    a := [1,2,3,4];
    c := [[11,0.1], [12,0.2]];  //put breakpoint here
end;

Put a breakpoint on the line that assigns c, run the project and press the button. When the debugger stops at the line, move the mouse over the variable a. The debugger shows this popup:

The debugger popup for the variable a

In the popup, press the search icon Search icon. When more than one visualizer is registered for the type, a drop-down menu lets you choose one; otherwise the visualizer opens directly, in a new window:

The visualizer window showing the vector a

The window shows the type of the variable (array), its size (4 rows, 1 column), its storage precision (64-bit double precision) and the name of the variable evaluated, here a. A vector is always displayed as a single-column matrix, even though computationally it is a single row of a matrix. The pressed button Grid button shows that the data is displayed in a grid, and Variable button that the variable is shown directly, without post-processing, scripts or expressions. To see the data on a chart, press Chart button:

The vector a on a chart

You can also open the visualizer with the keyboard. Place the keyboard cursor (not the mouse cursor) within the variable to visualize and press SHIFT+CTRL+F6, or CTRL+ALT+F6 to open it with the chart. With the cursor next to the variable c, SHIFT+CTRL+F6 opens a second visualizer window:

A second visualizer window for the variable c, still empty

It is still empty: the variable c has no value yet. Click into the code editor and press F8. Both visualizers update their content, and the second window now shows the content of c:

Both visualizer windows after F8

All visualizer windows can be docked into the RAD Studio IDE and into each other:

Docked visualizer windows

Visualizer windows docked into each other