You may find that debugging is a whole lot easier on a desktop's monitor, preferably one with a whole lot of screen real estate. Because you often need to see what's happening on your layout, you may find yourself moving the debugger window around on your screen so you can keep tabs on data that's being created or edited, changing found sets and the context in which script steps are performed. Unlike most dialog boxes, Script Debugger stays on top of your work while your script is running, giving you constant feedback. You can run just one line of the script at a time, dig into subscripts or back out to the calling script, skip over some steps completely, back up and run some steps over again, or stop the script completely.
![.vbs script debugger .vbs script debugger](https://i.stack.imgur.com/U5thR.png)
But even better, it gives you complete control over the script while it runs.
![.vbs script debugger .vbs script debugger](https://imgs.developpaper.com/imgs/20090913211247406.png)
The Script Debugger window's loaded with information about the current script. While the debugger's on, FileMaker shows the Script Debugger window any time you run a script (Figure 19-1).įigure 19-1. Its a toggle command, so a checkmark appears when the debugger's on and disappears when it's off. To run a script using Script Debugger, choose Tools Debug Scripts. If a script for which you have editing privileges calls a subscript for which you don't, the subscript will execute but you won't be able to see the steps in the debugger.
#.vbs script debugger password
Note: To run Script Debugger, you must be logged into the file with a password that has script-editing privileges (Section 16.2.3.6). 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. Even simple scripts can go wrong in puzzling ways that you can't detect by reading over your steps.
![.vbs script debugger .vbs script debugger](https://i.ytimg.com/vi/omXNuEe59G0/maxresdefault.jpg)
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. 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. You perform the script and wait to see what happens at the end. When you write a script using FileMaker Pro, your testing and troubleshooting routine is pretty simple.