Is there a way to monitor script execution? I have a weird defect in a script where the script works fine locally but not remotely.

I would like to avoid writing to a file however if I have to I will.

Can I attach a debugger to mIrc and watch script execution and inspect call stacks and variables etc?

Any advice would be greatly appreciated.