When your program stops at a breakpoint, click the icon to the right of the debugger menu (see the figure below). You can enter methods or variable names in this window and see what they will be.

You can enter any expression that you like (as long as it is within the area where you violated the code), and enter any hard-coded values โโor objects without restarting your project.

To add a variable to the watchlist
Start by placing a breakpoint in the class where you want to see a specific variable. Run the code, and as soon as it reaches the breakpoint from the window of the variable window, you will see all the available variables. Just select the one you want to watch, and then right-click and select "Add to watch" from the drop-down list.

Keep debugging, and you should see a variable from the update window of the clock window, when necessary, based on your code.

source share