You can browse the values of variables and constants in running applications. The browser shows the run-time value of a variable or constant in its Values page. Simply browse the definition of the variable or constant by double-clicking on it in the project's Definitions page.
The values are shown in a table. Thread variables (variables local to a particular application thread) are shown with an entry for each thread containing a variable of that name. Constants and global variables only ever have one value across all threads, so this is shown as a single table entry entitled "All threads". You can update the value shown in the browser with View > Refresh.
We will browse Reversi's *reversi-piece-shape* variable to show how we can monitor the value of a variable while an application is running. That variable stores the current shape of the pieces being used on the Reversi board. By default, Reversi uses circular pieces.
*reversi-piece-shape*.
Figure 5.3 Browsing values in a running application thread.
The value of *reversi-piece-shape* is shown as #"circle" for all threads. This is what we expected. Reversi has only a single thread, and we expected some value that would represent a circle.
Figure 5.4 Updated variable value after changing state of application.
The value is now #"square". This reflects the internal change to the variable that our menu selection caused.