4D v14.3Catching Commands |
||
|
4D v14.3
Catching Commands
Catching Commands
The Caught Commands List is a page of the Runtime Explorer that enables you to add additional breaks to your code by catching calls to 4D commands. Catching a command enables you to start tracing the execution of any process as soon as a command is called by that process. Unlike a break point, which is located in a particular project method (and therefore triggers a trace exception only when it is reached), the scope of catching a command includes all the processes that execute 4D code and call that command. Catching a command is a convenient way to trace large portions of code without setting break points at arbitrary locations. For example, if a record that should not be deleted is deleted after you have executed one or several processes, you can try to reduce the field of your investigation by catching commands such as DELETE RECORD and DELETE SELECTION. Each time these commands are called, you can check if the record in question has been deleted, and thus isolate the faulty part of the code. With some experience, you can combine the use of Break points and command catching. To open the Caught Commands page: 1. Choose Runtime Explorer from the Run menu. The Runtime Explorer window appears. 2. Click on the Catch button to display the Caught Commands List: This page lists the commands to be caught during execution. It is composed of two columns:
To add a new command: 1. Click on the add button (in the shape of a +) located below the list. 2. Enter the name of the command you want to catch. 3. Press Enter or Return to validate your choice. 4. Select Add New Catch, then select the desired command from the command themes and names submenus. A new entry is added with the command you selected. To edit the name of a caught command:
To disable or enable a caught command:
Shortcut: Each entry in the list may be disabled/enabled by clicking on the bullet (•). The bullet changes to a dash (–) when disabled. To delete a caught command:
Note: To delete all the caught commands, click on the Delete All button (third button located below the list) or chosse Delete All in the context menu. To set a condition for catching a command:
Note: To remove a condition, delete its formula.
|
PROPERTIES
Product: 4D SEE ALSO
Break List ARTICLE USAGE
4D Language Reference ( 4D v11 SQL Release 6) |