LNS Home

SD4 Headling

Debugging FaceSpan Projects

FaceSpan is a Rapid Application Development (RAD) tool that uses AppleScript as its scripting language. This document explains how to use Script Debugger to debug AppleScript code within the FaceSpan environment. By combining FaceSpan with Script Debugger you get a very powerful set of tools to quickly build Macintosh applications.

NOTE I: Script Debugger 2.0 must be running before you can open or edit FaceSpan scripts that utilize Script Debugger's debugging capabilities. Script Debugger 3.0 will launch automatically if it is not already running.

NOTE II: The techniques described in this document require Script Debugger 2.0.4 or later.

Debugging Project Scripts

To enable AppleScript debugging, open the Project Script using FaceSpan's script editor (press the Project Script button). Use the Scripting Language popup menu at the bottom of the script window to select the "AppleScript Debugging" language.

Once you have selected the AppleScript Debugger language, save your changes by closing the Project Script window.

From this point onward, whenever the project script is executed, Script Debugger will appear and allow you to step through the project script. For instance, choosing a menu item causes Script Debugger to appear, letting you step through the choose handler.

If you want to use breakpoints, open the project script in a Script Debugger external editor window before executing your script. You can then set breakpoints and they will be triggered when FaceSpan invokes the script. You may want to adjust the AppleScript Debugging Options in the Scripting Settings panel of Script Debugger's Preferences dialog if you intend to use breakpoints when debugging FaceSpan scripts.

To disable AppleScript debugging, switch back to the AppleScript language using the Scripting Language popup menu in the Project Script window.

NOTE: You cannot enable or disable debugging in the Project Script using Script Debugger as your external editor due to limitations within FaceSpan. However, you can use Script Debugger to enable or disable debugging for window or window item scripts.

Debugging Window and Window Item Scripts

Debugging AppleScript code attached to Windows and Window Items is very similar to debugging Project scripts. First, open the script in the FaceSpan script editor or use the Script Debugger external editor. Next, select AppleScript Debugger from the Scripting Language popup menu.

From this point, whenever the script is executed, Script Debugger will appear to let you debug it. By opening FaceSpan window or window item scripts in Script Debugger external editor windows, you can set breakpoints to help with debugging.

As with Project scripts, to dsiable debugging sinple select AppleScript from the Scripting Language popup menu.

Configuring Script Debugger as an External Editor

FaceSpan allows you to replace its internal script editor windows with those of an external application such as Script Debugger. To install Script Debugger as an external editor, run the Install Script Debugger script located in the FaceSpan Development folder of Script Debugger's Tools & Goodies folder.

To open a FaceSpan script in Script Debugger, hold down the Option key when pressing the Project Script button in the FaceSpan Project window or the Script button in the Properties palette window.


Explore | Edit | Run & Debug | Deploy | What's New In 4.0 | My SD Story

 

Script Debugger 4.0.8
Home
Download
x Buy
x Explore
x Edit
x Run & Debug
x Deploy
What's New In 4.0
My SD Story
Software Updates
 
3.0.9 Update
2.0.5 Update
x Free Downloads
 
XML Tools
XSLT Tools
x Property List Tools
x List & Record Tools
x JavaScript OSA
Register Your Copy of Script Debugger
Join the Script Debugger Mailing List
x AppleScript/ Scripting Links
Products
Affrus 1.0
x FaceSpan 4.3
Script Debugger 4.0
Site Contents
Home Page
bullet Mark’s Blog
Product Registration
Bug Reporting
x Freeware
Contacting Us

Copyright © 1998-2007 Late Night Software Ltd. - All Rights Reserved.