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

SD4 Headling


image

Call Stack

image

The call stack is the chain of handler calls currently executing in your script. Execution typically starts with the script’s run handler (implicit or explicit). Code in this handler can call another handler, which can call another handler (or the same handler, recursively), and so on, so that at any given moment during the execution of your code, there is a nest or chain of handlers leading down from top level to the line currently being executed.

The call stack is shown in the second pane of the result drawer (the word “Stack” appears at the top).

image

The stack grows downward. In the illustration above, the script’s implicit run handler told the script object s to run, s’s implicit run handler called the rename handler, and the rename handler called the bust handler. Each entry in the stack is called a stack frame.

Stack frames newly added since the last time the script paused are shown in red. In the illustration above, all the stack frames are in red because this is the first pause since the script started executing.

Reflecting the call stack back in the script’s text area is a little tricky, because as long as there are multiple stack frames, we can be paused at more than one place simultaneously. You can see this happening in this illustration:

image

The implicit run handler of the main script (line 12) has called s’s implicit run handler, which has called pad (line 9), and we are now paused inside the pad handler (line 6). Thus there is a sense in which we are paused at line 6 and line 9 and line 12 simultaneously. To indicate this, line 6 (the next line we’ll actually execute) has a blue arrow, and the others have a hollow (white) arrow. The blue arrow shows the current line in the current stack frame.

You can select a line of the call stack pane to explore different stack frames. When you do, three things will happen:

  • Back in the script’s text area, the line where we’re paused in the selected stack frame is highlighted. So, in the above illustration, if you click the s line in the call stack pane, then back in the script’s text area, line 9 is highlighted.

  • The variables pane changes to reflect the variable values in scope in the selected stack frame.

  • Expressions are re-evaluated against the selected stack frame.



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


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