Viewing Variables during debug

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Viewing Variables during debug

4,120 Views
lpcware-support
Senior Contributor I

Local Variables

All of the local variables for the current stack frame can be viewed in the Variables view.

Global Variables

Unlike LPCXpresso IDE v4 and earlier, in LPCXpresso v6 globals are not accessible through the Variables view.To view the values of global variables whilst debugging, you need to add them to the Expressions view. A simple way to do this is to highlight the variable of interest in the Editor view, then right click and use the "Add Watch Expression..." option. The value of each global added will then be updated each time execution of your application is paused or a breakpoint hit.

Alternatively, you can use the "List, select and add globals to view" icon in the Expressions View

146899_146899.jpgGlobExpr1.jpg

to show a list of available global variables in a pick list. Simply select the variables that you are interested in

146909_146909.jpgGlobExpr2.jpg

and they will be added to the Expressions view for you.

146910_146910.jpgGlobExpr3.jpg

Displaying address of variables

It is possible to optionally display the actual address of globals that you have added to the Expressions view (and also the address of a local in the Variables view). To do this, click on the "View Menu" icon (the downward facing triangle on the right hand side of the Expressions/Variables View), and select:

View Menu : Layout - Select Columns - Address

Changing format variables displayed in

Variables displayed in the Expressions view (and Variables view) are displayed typically in decimal in the "Value" column, and then in several bases in the detailed information pane for the currently selected variable. You can change the base used for displaying in the "Value" column by clicking on the "View Menu" icon (the downward facing triangle on the right hand side of the Expressions/Variables View), and selecting :

View Menu : Number format

Note - although there is a workspace preference for setting a default format for Variables and Expressions, this does not currently get picked up by the views themselves.

Labels (1)
0 Replies