You can view the sequence in which events occur by turning on event tracking in the Visual FoxPro Debugger. You can determine the most efficient location to add code to events by using event tracking to see when the events associated with your forms and controls occur in relation to other events.
To turn on event tracking
On the Tools menu, choose Debugger.
On the Tools menu of the Visual FoxPro Debugger, choose Event Tracking.
In the Event Tracking dialog box, select Turn event tracking on.
You can also set event tracking by using the SET EVENTTRACKING command. For more information, see SET EVENTTRACKING Command.
By default, the events that appear in the event tracking list appear in the Debug Output window as they occur. You can also choose to send output results to a file.