Debugging scripts (FileMaker Pro Advanced)
• step into a sub-script to execute it one step at a time, or step out of a sub-script
• begin debugging from any script steps within the script
1.
This command passes control to the highlighted step but does not perform the step. The highlighted step is performed when script execution or debug stepping is resumed. Any script steps between the last executed step and the assigned next step are not executed. Click a step to highlight it, then click Set Next Step. Toggle between executing all script steps until the end of a script or a breakpoint is encountered and pausing. When a script is paused, you can double-click the script in the Call Stack list to edit it. Each active script opens in a separate Edit Script dialog box, so you can edit multiple scripts. Script execution is not halted until you save the changes. You can also choose Tools menu > Debugging Controls > Disable Script Triggers or Enable Script Triggers. Note You cannot set breakpoints on steps called by a button or custom menu. Note To edit the script step associated with buttons or custom menu items, use the Button Setup or Manage Custom Menu dialogs.
4. Select Pause on error if you want scripts to pause when errors are encountered.For Last error, click the error number to open a Help topic with details about the error. See FileMaker Pro error codes.
1. To open the Script Debugger from the Manage Scripts dialog box, select a script, press Shift and click Perform. To close the Script Debugger, press Ctrl (Windows) or Command (OS X) and click Perform. For more information on keyboard shortcuts, see FileMaker Pro Advanced keyboard shortcuts (Windows) and FileMaker Pro Advanced keyboard shortcuts (OS X).
3. Click Step Into.The Call Stack list displays the sub-script.
4. Select a script in the Call Stack list to view that script’s steps in the display area.
• When you debug a script that is called from a button, the button is identified in the Call Stack list by the filename and layout in which the button is located. The button name is the button object name that was assigned using the Inspector. If no name was assigned in the Inspector, <unnamed button> followed by the filename and layout appears in the list.When the Script Debugger stops on a script step called by a button in the script step list, the text above the list changes to Button: <name of button>, or it changes to Button: <unnamed button> if no name was assigned in the Inspector.
• When you debug a script that is called from a custom menu, the menu item is identified in the Call Stack list by menu item name and filename. When the Script Debugger stops on a script step called by a custom menu in the script step list, the text above the list changes to Menu item: <custom menu item text>.