Script Debugger

When you write a script using FileMaker Pro, your testing and troubleshooting routine is pretty simple. You perform the script and wait to see what happens at the end. In a simple script, like one that prints a report, it’s easy enough to see what went wrong and fix it: Your script just went to the wrong layout, perhaps. But when you’re creating a complex script that sets variables and works with different sets of records that you can’t verify before the next script step whizzes past, it’s devilishly hard to figure out where your script veers off course. Even simple scripts can go wrong in puzzling ways that you can’t detect by reading over your steps.

That’s where Script Debugger comes in. When you run scripts with Script Debugger turned on, FileMaker performs scripts at human speed, so you can see exactly what’s happening, each step of the way.

Note

To run Script Debugger, it’s best to be logged in to the file with a password that has script-editing privileges (see Script privileges). But if you need to figure out how a script runs for lesser accounts, you can log in as someone else, then use the Authenticate/Deauthenticate button (see Controlling Script Execution).

To see the Script Debugger, choose Tools → Script Debugger. When you do, the Script Debugger window appears on the screen (Figure 19-2). Left to its own devices, the Script Debugger window doesn’t do much. It consists of a couple blocks of empty space and several buttons you can’t click.

But it shows its ...

Get FileMaker Pro 9: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.