Author Topic: Displaying Global Variables in a Debug Watch Window  (Read 10943 times)

markj_47

  • Guest
Displaying Global Variables in a Debug Watch Window
« on: November 01, 2009, 04:00:14 pm »
When using the debugger the watches window does not display global variables - only local variables and function arguments.  Any one know of a way to make this display?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5930
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Displaying Global Variables in a Debug Watch Window
« Reply #1 on: November 01, 2009, 04:08:14 pm »
When using the debugger the watches window does not display global variables - only local variables and function arguments.  Any one know of a way to make this display?

You should manually add the global variables you want to watch.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

zabzonk

  • Guest
Re: Displaying Global Variables in a Debug Watch Window
« Reply #2 on: November 01, 2009, 04:10:37 pm »
Right-click on the watch window and use the "Add Watch" option to enter the name of the global you are interested in.