error on build

Hi… back in the old days of using script editor, when I would try to compile and there was an error, it would kindly take me to the line where the error occured…

These days in xcode, it seems that it just says “FAILED” yet gives me no clue as to where there was a problem during building… is there something I can do that will show me what the problem is?

thank you in advance!

You could add breakpoints in your code then use the debugger, or you could put ‘log’ commands around where you think the error is occuring. I still haven’t got the hang of the debugger so I end up using ‘log’ a lot. The debugger can be great though. It shows you the state of the environment at the breakpoint so you can check variable values, etc. I usually wrap handlers in log statements so I pretty much get the same effect. Something like:

on deleteItem(theItem)
    log "deleteItem(" & (theItem as text) & ")"
    -- delete item code
    log "exiting deleteItem()"
end deleteItem