Debugging on open handler for droplets in Applescript Studio

I’m in 10.6 with Xcode 3.2.1, but it’s a droplet so no ObjC… hope I’m posting in the right place.

I made a droplet in Xcode, and I want to debug the “on open” handler, to step thru it and see variables in Applescript Studio while the open handler is running. The “on idle” is OK, but missing global variables that on “open needs” to set (like the name of the dragged file is something I need to know in “on idle” routine).

I thought on open runs before on idle, but I guess not if there’s nothing to open!
Setting break points in in open handler is fruitless because it is never called.
How do I tell it what file to “open” or get it to call the open handler?
Debug & run obviously only runs idle handler normally…

What else can I do?

Frustratingly, it works fine (and no errors) pasted into Script Debugger, but it needs to be Studio to run as needed when done, plain applescript.app won’t do.

Model: mbp
AppleScript: 10.0? Xcode 3.2.1
Browser: Firefox 3.6
Operating System: Mac OS X (10.6)

I may be getting the wrong idea here, but one thing you can do is, after each variable declaration, you could output its value to the console:

log myVariable

But I’m not sure if that’s what you want, and you’d have to delete/comment them out later…

Thanks, that’s quite handy. Not quite what I was hoping for, but at least a simple way to get a glimpse of what’s happening when I run app standalone.

It did get me past this issue, which turned out to be that I can’t set variables in awake from nib, because there is no nib in a droplet, I guess, just a .xib, which apparently is not awakened with nib… so I moved them to will launch and that worked.