First, we’ll add a breakpoint so the program will stop execution and we can view data.
1. Set a breakpoint.
— Navigate to the word “evaluate” on line 32, in main(), to open evalexpr.c. Set a breakpoint on line 15 inside the evaluate() function at the assignment statement.
NOTE >> Disable any other breakpoints you have set, for this discussion.
— Click Go () on the toolbar. The program stops on the breakpoint.
Now let’s view some data.
2. View variables in the VAR drawer
The VAR drawer lists local variables. Scalar values, such as result, are displayed directly, while compound types, such as node, are identified with just type information.
The Info view displays additional detail about the location of the stopped thread and the selected frame in the stack trace.
3. View variables in a tooltip
In the Source pane or the VAR drawer, hover over the variable result to view a tool tip that displays its value: