Game Development Reference
In-Depth Information
Debugging with MonoDevelop - the
Watch window
A Watch window allows you to view the value of a variable that's active in memory
in the current step, and this includes both local and global variables. One way to
quickly add a watch for a variable while it is in the break mode is to highlight it in the
code editor and then hover your mouse over it. When you do this, leaving the mouse
hovered for a few seconds, a pop-up window appears automatically. This window
allows the full inspection of a variable, as shown in the following screenshot. You can
contract and expand the members of a class and examine the state of all its variables.
Inspecting a variable with hover watches in the break mode
You can inspect practically all variable values for any active object using this hover
method. However, typically, you'll want to place a more permanent watch on a
variable and even a group of variables so that you can see their values collated
together in a list. For this, you can use the Watch window docked in the bottom-left
corner of the MonoDevelop interface. To add a new watch in this window, right-click
inside the Watch list and choose Add watch from the context menu, as shown here:
 
Search WWH ::




Custom Search