Form Debugging TipsID: Q129425 3.00 WINDOWS kbtool kbprg kbtshoot The information in this article applies to:
SUMMARYThis article gives you tips that can be used with the Debug window to help you debug forms.
MORE INFORMATION
THIS and THISFORM KeywordsThe THIS and THISFORM keywords can only be used in a class definition. Because an object has been instantiated when a form is running, the THIS and THISFORM keywords only reference the form object when a method is executing. You can use the form's name to reference it in the Debug window. A generic way to refer to the active form is to place the following expression on the left side of the Debug window:
The "(object)" word that is presented on the right side of the Debug window
will signify that an object reference to the form exists.
How to Verify the Method Currently ExecutingTo verify the method currently executing, type PROGRAM() in the Debug window. For example, if you have defined code for the Load event, the right side of the Debug window will read FORM1.LOAD when the Load event is executed.
How to Verify the Name of the Active Control in a FormTo verify the name of the active control in a form, type:
This expression returns the name of the member object, such as Command1.
How to Verify the Name of the Container of an Active ControlTo verify the name of the container of an active control, type:
How to Suspend Execution of the FormYou can suspend execution of the form by setting a breakpoint in the Debug window. For example, to verify the order in which methods are executed when you run a form, you can place PROGRAM() on the left side of the Debug window. This function is updated each time a method or the code associated with an event is executed. If you set a breakpoint in the Debug window by clicking the center bar, the execution of the form will be suspended each time the value returned by PROGRAM() is modified.
REFERENCESFor more information about using the Debug window, search for the "Debug Window" topic in the FoxPro Help menu. Additional reference words: 3.00 VFoxWin trace error current break point breakpoint suspending KBCategory: kbtool kbprg kbtshoot KBSubcategory: FxtoolDebug
|
Last Reviewed: May 1, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |