v2 Debugger?

Discuss the future of the AutoHotkey language
Posts: 1381
Joined: 11 Jan 2017, 17:59

v2 Debugger?

18 Jun 2018, 10:52

full disclosure im being lazy here and havent thoroughly looked into it, but i thought id post, before diving head first chasing something that might in the end not even amount to anything

im looking for something akin to this, but for v2: https://autohotkey.com/boards/viewtopic ... 61&t=34398
setting breakpoints, stepping through, debug vars and call stack

does anybody happen to have a working solution already?
Posts: 1381
Joined: 11 Jan 2017, 17:59

Re: v2 Debugger?

18 Jun 2018, 17:09

so here are my findings:

i tried https://autohotkey.com/docs/AHKL_DBGPCl ... ebugClient out. It works, but honestly not a big fan. Downloaded the binary, ran it, ran a script from the terminal with the /Debug flag on, it got picked up immediately no issues there. U can set breakpoints, step in, over and out of functions, there's a call stack, but looking at the variable has to be the hugest PITA ever. U have to select them and hit 'Inspect' and i couldnt find a way to have them update automatically.
Verdict: 2/10, 4/10 if u just need it for a quick step through

ive settled for this workaround instead: Downloaded https://autohotkey.com/boards/viewtopic ... 61&t=34398 anew.
Amended SciTeUser.properties not to include _platform.properties, but rather:
So far its been working without a hitch, but ill be monitoring it still. i noticed in the config files for Scite that there was some mention of conditional platform configurations, but i cant devote any more time investigating it rn and although admittedly it
is borderline the dumbest possible solution i could come up with in a jiffy, it works. Nonetheless, if u got any cleverer solutions, feel free to share them.
Posts: 6205
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: v2 Debugger?

18 Jun 2018, 18:59

SciTE4AutoHotkey is already equipped to support v2 via the platform selector. You just have to put the executable files where it will find them.
.condplat v2(x86) FileExist, %AhkDir%\v2-alpha\x86\AutoHotkey.exe
.condplat v2(x64) FileExist, %AhkDir%\v2-alpha\x64\AutoHotkey.exe
... or you can change the paths in platforms.properties, as I have done.

It should also work if you replace the main AutoHotkey files with v2 files. Parts of SciTE4AutoHotkey are v1 scripts, but they use InternalAHK.exe to run.
Posts: 1381
Joined: 11 Jan 2017, 17:59

Re: v2 Debugger?

22 Jun 2018, 18:59

i wont dwell on the fact how i had, apparently for years, remained unaware of the presence of this button Image. my brain must have been filtering it out or smth
anyway, disregard the aforementioned jury-rigged solution as it is indeed rather stupid, following your advice on .condplat i used this v2 script to generate symlinks:

Code: Select all

pathScite := FileSelect(0, A_AhkPath, "Locate your 'SciTE.exe' executable.", "SciTE.exe")
rootScite := RegExReplace(pathScite, "^(.*)\\SciTE\\SciTE\.exe$", "$1")
SplitPath(A_AhkPath, , rootV2)
DirDelete(rootScite "\v2-alpha", 1)
		(RTrim0 Join
			*RunAs {1:} /k
			mkdir v2-alpha\x86 &&
			mkdir v2-alpha\x64 &&
			mklink v2-alpha\x86\AutoHotkey.exe "{2:}\AutoHotkeyU32.exe" &&
			mklink v2-alpha\x64\AutoHotkey.exe "{2:}\AutoHotkeyU64.exe"
		)", A_ComSpec, rootV2), rootScite)

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: iseahound and 9 guests