Page 1 of 1

AHK V2: Is there a way to get full CallStack in script instead of just for current thread?

Posted: 02 Aug 2018, 12:23
by SAbboushi
I'm looking to get (in script) something like what a debugger provides, but as far as I can tell, using Exception object only returns Callstack info for the current thread:

Code: Select all

    SciTE4AutoHotkey Callstack:
    
      Script filename	Line	Stack entry
      ---------------   ----    -------------------
      GetCallStack.ahk  71	    GetCallStack()          <-- Exception("", -1).line = 106
      gar2.ahk	        106	    MsgBox3()               <-- Exception("", -2).line = 85
      gar2.ahk	        106	    Timer thread
      gar2.ahk	        85	    MsgBox()
      gar2.ahk	        85	    MsgBox1()
      gar2.ahk	        83	    Timer thread
      gar2.ahk	        68	    MsgBox()
      gar2.ahk	        68  	Auto-execute thread

Re: AHK V2: Is there a way to get full CallStack in script instead of just for current thread?

Posted: 02 Aug 2018, 16:41
by lexikos
Not for the script's own call stack. The DBGp client can, and DBGp clients can be written in script, but must be separate to the script being debugged.

Re: AHK V2: Is there a way to get full CallStack in script instead of just for current thread?

Posted: 02 Aug 2018, 21:14
by SAbboushi
K thanks. Bummer