|
Debugging a script is like running it, except that as it runs in debug mode, your script can pause in the middle. Script Debugger can debug (and run) multiple scripts simultaneously. This opens up all sorts of new possibilities. You can see (and alter!) the values of your script’s variables, and other AppleScript values, as they change during the course of execution. You can see what code is executed and what choices your code makes. The Apple Event Log window also takes on new powers. Thus, with debugging, you can learn much more about how your script operates. Debugging is a separate mode. A script is either in debug mode or it isn’t. When you enter debug mode, the window changes slightly, to accommodate things like breakpoints and code coverage in the gutter, and additional menu items (and toolbar buttons) become active to permit stepping through the code. As your code executes in debug mode, it can pause, and thus the big question is, when will it pause? The answer involves chiefly the interplay between breakpoints and the stepping commands.
|
||||||||||||||||||||||