Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: FoxPro FAQ

Debugging and Tuning

How to manage entries in the watch window by Mike Lewis
Posted: 27 Jun 03 (Edited 16 Nov 06)

The watch window is an extremely useful tool, but it often gets very cluttered. There is no obvious way of clearing out the entries and starting with a clean slate - other than to laboriously select each item in turn and hit the Del key. Nor can you easily sort the items alphabetically. The only obvious way of doing that is to delete individual items and re-enter them in the desired order.

Fortunately, there are a couple of tricks that will help you manage your watch window entries.

The resource file

The entries are held in the Foxuser resource file, in a record whose ID is WATCHEXPR. Within that record, the entries can be found in a memo field called Data.  However, if you want to delete the entries, donÆt simply delete the contents of the memo field. If you do, youÆll get an error message the next time you open the debugger.

You can, however, safely delete the entire record. This will clear out all the watch window entries, and might also reset your debugger window layout, although other debugger settings, like breakpoints, will remain intact.

The debugger configuration file

 A better approach is to use a debugger configuration file. This is the file that is created when you select Save Configuration from the debuggerÆs File menu. It contains various debugger settings, including the watch window entries.

Now, the configuration file (which has the extension DBG) is an ordinary text file. You can open it in a text editor and edit the entries to suit your needs. The watch window entries begin with WATCH=, as in this example:


So you can manually add and delete entries, or arrange them in whatever order you like. The next time you go into the debugger, select Load Configuration from the File menu to restore the saved settings.

A good way of using this technique is to create a standard DBG file with a core set of your favourite watch window entries. During a debugging session, add more entries to the window in the usual way. From time to time, re-load the DBG to restore your favourites. The process only takes a couple of clicks but will make your use of watch window that little bit easier.

Mike Lewis
Edinburgh, Scotland

Back to Microsoft: FoxPro FAQ Index
Back to Microsoft: FoxPro Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close