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

Why Doesn’t My Script Debug Properly?

image

There are some known cases where a script that runs fine normally will generate a spurious error when you’re in debug mode, thus making it impossible to debug it.

If you run into this sort of situation, try changing any repeat with … in blocks to normal repeat with loops. For example, this script chokes in debug mode:

tell application "BBEdit"
    tell document 1
        set L to (get every word where its text begins with "t")
        repeat with aWord in L
            tell contents of aWord
                change case of it making capitalize words
            end tell
        end repeat
    end tell
end tell

But this version works fine:

tell application "BBEdit"
    tell document 1
        set L to (get every word where its text begins with "t")
        repeat with i from 1 to (count L)
            tell (item i of L)
                change case of it making capitalize words
            end tell
        end repeat
    end tell
end tell

Let us know if you run into any other cases.



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


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