How to Debug Random Script Freezes in Script Debugger?

Hello

I’ve been running into an odd issue while working with AppleScripts in Script Debugger. Every once in a while, the script seems to freeze midway through execution without throwing any errors.

When I stop the script and rerun it, sometimes it works fine, and other times it gets stuck again. This makes it really hard to know what’s going wrong or where exactly the script is hanging.

I tried using breakpoints to narrow it down, but because the freeze isn’t consistent, it doesn’t always stop in the same place. I’m wondering if anyone else has seen this kind of random freeze behavior and what steps you use to diagnose it.

Is there a setting or tool inside Script Debugger that can help track background processes or external calls that might be blocking?

I found this Script Debugger user guide but didn’t see much about handling intermittent hangs. Any tips, debugging workflows, or examples would be very helpful for figuring this out!

Thank you !!

The next time you experience a hang, please collect a Sample report using the Activity Monitor utility. This report may help us understand where your code has gotten stuck. Once we know the cause of the hang we may be able to help work out a solution to the problem.