Database Reference
In-Depth Information
database as one of these restricted people to test the script, but then you can't see the
contents of the script in the debugger. If you click the Authenticate/Deauthenticate button
(and enter your full access account name and password), though, then FileMaker lets you
see and debug the script. Importantly, the script runs as though you're still the restricted
person. You can see exactly how it behaves for your less privileged users and then hunt
down the problem.
By using the buttons in the Script Debugger, you can watch your script in action, performing
each step one by one, and examining the results as it goes. This approach makes it infinitely
easier to see where a script goes wrong as you try out various iterations, squashing bugs
along the way.
TIP
Each of the buttons in the Script Debugger window has a menu command counterpart in the
Tools→Debugging Controls menu. If you prefer the menus, or want to learn the keyboard shortcuts,
this menu is your friend.
Breakpoints
In some situations, the click-the-step-button-for-each-step approach can become unaccept-
ably tedious. For example, you may have a long script, and you know the problem part is
near the end. To make your life simpler, the Script Debugger includes breakpoints . You set a
breakpoint on any line you want and then click the Run/Pause button. FileMaker immedi-
ately begins cruising through the script steps, running them at full speed. When it reaches the
step with the breakpoint, it immediately stops so you can begin stepping manually.
You can set a breakpoint three different ways:
▪ In the Script Debugger window, select the script step and then click the Set/Clear Break-
point button.
▪ In the Script Debugger window, click next to the script step in the gray stripe along the
left edge of the script steps.
▪ In FileMaker Advanced, the same gray stripe appears in the Edit Script window. You can
click next to any step when editing a script to set a breakpoint. Using this method, you
can set a breakpoint in a deeply nested subscript, before you debug the main script. Then,
if you click Run/Pause, FileMaker runs through the script and its subscripts until it hits
your breakpoint, saving you a lot of clicking.
Search WWH ::




Custom Search