Viewing Variables during debug
All of the local variables for the current stack frame can be viewed in the Variables view of the Code Red IDE.
Global Variables in Code Red IDE v5
Unlike earlier versions of the IDE, 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, in Code Red IDE v 5.0.14 and later, 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.
Note - In order for the "List, select and add globals to view" icon to function, the current application being debugged must be in scope within the Debug View. This will normally be true, but occasionally you may find that you need to reselect the current application
Displaying address of variables
In Code Red IDE v5, 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
In Code Red IDE v5, 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. ]
Global Variables in Code Red IDE v4 and earlier
Global variables in these versions of the IDE are accessible through a pick list in the Variables view. Thus they get displayed inline with the local variables. Simply select the globals that you want to have displayed. If required you can also add them to the Expressions view (though note that there is no pick list in the Code Red IDE v4 Expressions view)) .