Hi,
I’m trying to debug an issue with dead keys so I cloned the repo, put a few breakpoints and run the debug version.
The issue is that it makes the system very unresponsive when a breakpoint is hit.
How do you guys debug AHK?
How to debug AHK?
-
- Posts: 20
- Joined: 20 Feb 2020, 05:05
-
- Posts: 20
- Joined: 20 Feb 2020, 05:05
Re: How to debug AHK?
I added
InstallMouseHook false, true
to my test script so I can use the mouse while in a breakpoint
InstallMouseHook false, true
to my test script so I can use the mouse while in a breakpoint
Re: How to debug AHK?
My personal preference...
In modules, small bites. Using msgbox or Listvars. Sometimes commenting out code or halting the script to take a chunk at a time (half-splitting), then building back until the source of the issue is located.
In general, I place most of my code in functions or classes so debugging can my done in small sections.
I don't rely any built-in IDE tools myself. That way I am not lost when the tools are unavailable with a different editor. And there is no need to learn new tools each time the editor changes. And no possibility that the built-in debugger could introduce an alternate issue or mask the one I am trying to find. And minimal resources required (as you mentioned can be a problem).
There might be better ways, and I'd be happy to learn them. Good idea for a thread... thanks for posting.
-
- Posts: 20
- Joined: 20 Feb 2020, 05:05
Re: How to debug AHK?
Thanks for your answer
I’m talking about debugging Autohotkey itself, not a script
I’m talking about debugging Autohotkey itself, not a script
Re: How to debug AHK?
When I debug issues that relate to the keyboard hook, I make heavy use of logpoints (i.e. breakpoints which log a message and continue execution).
In theory, it might be possible to debug such issues with remote debugging, putting the scripts in a VM or PC separate to the IDE; but I've never tried it.
In theory, it might be possible to debug such issues with remote debugging, putting the scripts in a VM or PC separate to the IDE; but I've never tried it.
Return to “AutoHotkey Development”
Who is online
Users browsing this forum: No registered users and 12 guests