If you are using Storyboard 1.1 or greater you can make use of our integrated debugger for your Lua scripts. This can provide a lot of insight into what all is going on inside of your scripts to give you the understanding you need.
You read our technote on using the Lua debugger here:
http://www.cranksoftware.com/cranksoftware/docs/html/ch07.html
Or for those of you who prefer the movie over the book you can watch it here:
http://cranksoftware.com/videos?tubepress_video=jpPwlqUb3JA
