NOTICE: This website will be shut down in the near future. Product content has moved to Forum content and FAQs have been moved to We encourage you to create a user account on to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions and look forward to seeing you at our new web location.


Viewing Variables during debug

lpcxpresso-support's picture

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

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

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

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. ]

Your rating: None