Hello,
Here’s the simple truth about Troubleshooting / Debugging 🚫🐜
Programming IS troubleshooting!
No matter how good you are, code rarely works on the first try. We all write some code and then spend the majority of our time working through problems.
Most people new to programming don’t take time to learn how to debug however it is one the best places to invest a little time because it will save you hours later. If you’re learning AutoHotkey you’re already amongst the elite group of people that are willing to invest time to save time. Spending a little time learning how to do basic troubleshooting is a great way to save time later!
There are lots of advanced ways to troubleshoot. I have an entire playlist which might interest you however, in this email, we’re going to cover the basics. You can check out this video which walks through the below list
- Is it running ( in system tray)?
- Try Rebooting windows (have you tried turned it off and on again?)
- Stop all other scripts & programs
- Try it on a different computer
- Try running script as Admin (Right-click script and run as Admin)
- Try (temporarily) turning-off UAC (User Account Control)
- Is your script context sensitive? Try making it general and test
- Does your code only work at certain places in the script? Make sure you understand the Auto-Execute section
- Add a message box where you expect your script to be. Are you actually getting where you think you are?
- If you’re looking at a variable
- Are you in a function?
- Confirm the variable has what you expect.
- Test for Scope
- Did you declare it correctly (global, etc.)
- Are you working with an object? Use IsObject() to confirm it actually is an object
When Troubleshooting
- Isolate down to one “thing”
- Use message boxes, Tooltips, etc. to check values and verify your location
- Talk out loud: explain it to someone else or use bobble-head approach
- Question all of your assumptions
- Take a break. If you’re hitting a “brick wall” often taking a mental break will give you a new perspective (it’s like hitting “clear” on the calculator)
- Utilize built-in debug features of your IDE
- In v1 Learn to use the built-in ErrorLevel variable. In v1 or v2 use a Catch with Throw / Exception handling
Not only do we offer 3 hours a week of live calls on Zoom (where people can get direct help) but we have a private Telegram group where, during the week, people can ask questions and get quick help. You really should check it out. It’s a great program that the members love!
Additional Resources
- Debugging in SciTE4AutoHotkey
- Debugging in AHK Studio
- Configuring VS code for debugging
- Debugging Webinar
Joe, Isaias, Irfan & Team
This campaign was designed to allow you to jump around. At any time you can jump to any one of the emails by clicking below
This campaign was designed to allow you to jump around. At any time you can jump to any one of the emails by clicking below
P.S. Nothing can be more painful than getting stuck on something you’re so close to and not having a resource to help. That’s one of the main reasons people join the AHK Hero Club. ❗

