SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by SAbboushi » 06 Sep 2018, 08:44

lexikos wrote:...allowing the debugger to see local variables of running functions other than the current one.
Nice!

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by SAbboushi » 06 Sep 2018, 08:42

lexikos wrote:OK, apparently making the window resizable allows it to be maximized by double-clicking the titlebar even though there is no maximize button. The potential workarounds and fixes are:
  • Just don't maximize the window.
  • Change SaveDvWindows() to include the word Maximize in the IniWrite value if the window is maximized.
  • Disable or remove the Maximize option in each window's system menu to prevent maximizing.
  • Block the WM_SYSCOMMAND,SCMAXIMIZE message to prevent maximizing.
  • Put the correct parameters into the ini file and set it to read-only to prevent the script from changing them.
lexikos - many thank for that amazingly comprehensive and rather creative list of alternate solutions. I'm not sure yet how to do most of them, but the learning continues!

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by lexikos » 22 Aug 2018, 04:19

I have updated Lexikos/SciTE4AutoHotkey to fix a few issues and add support for selecting stack depth. Double-clicking a stack entry will now set the 'depth' used when querying local variables, allowing the debugger to see local variables of running functions other than the current one. This requires v1.1.30+ or v2.0-a099+; earlier versions will simply return no variables if depth is non-zero. Depth reverts to zero when execution resumes.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by lexikos » 09 Aug 2018, 02:42

OK, apparently making the window resizable allows it to be maximized by double-clicking the titlebar even though there is no maximize button. The potential workarounds and fixes are:
  • Just don't maximize the window.
  • Change SaveDvWindows() to include the word Maximize in the IniWrite value if the window is maximized.
  • Disable or remove the Maximize option in each window's system menu to prevent maximizing.
  • Block the WM_SYSCOMMAND,SCMAXIMIZE message to prevent maximizing.
  • Put the correct parameters into the ini file and set it to read-only to prevent the script from changing them.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by SAbboushi » 08 Aug 2018, 18:44

Thanks for the replies--
evilC wrote:I didn't write any of the code though, I just packaged it.
I know - your post makes that quite clear! I was just posting about the disappearing window in case it was helpful to someone else.
lexikos wrote:Do you have a hotkey that minimizes windows? I do not think there is any other way to minimize this window.
No.
lexikos wrote:Maximized, or just sized to fill the screen? The window has no maximize button.

I believe Maximixed (yes, it has no maximize button, but double-clicking on window header maximizes the window as far as I can tell).

lexikos wrote:If that were the case, it would happen for everyone. It works correctly for me. WinGetPos is used only to retrieve the position of the window, not the size.
I'm quoting from someone else's post which seemed to accurately describe the problem I'm experiencing with the debug Variables window.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by lexikos » 08 Aug 2018, 17:19

A value of -32000 usually means the window is minimized. Do you have a hotkey that minimizes windows? I do not think there is any other way to minimize this window.

Maximized, or just sized to fill the screen? The window has no maximize button. Maximized windows are sized larger than the screen. If you maximize the window with WinMaximize, the saved size will be inappropriate for the normal non-maximized state. The script does not restore the maximized state, because you aren't supposed to be able to maximize the window.
I suspect it has to do with AHK V1 WinGetPos gets the full window dimensions, while the Gui Show, w%Width%... command ignores window caption and some other extra pixels.
If that were the case, it would happen for everyone. It works correctly for me. WinGetPos is used only to retrieve the position of the window, not the size.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by evilC » 08 Aug 2018, 13:13

Do you have multiple monitors? I have seen issues before with any script that records window location between runs.
Sometimes it just seems to glitch out - it could be due to how the address space maps out, something as subtle as switching your monitors around or which port they are plugged into might affect it
Granted though, it's not that hard to write code to detect if that value is not visible, and move it on-screen.
I didn't write any of the code though, I just packaged it.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by SAbboushi » 08 Aug 2018, 10:56

2 annoyances: one I've found how to resolve
  • each time I start a new debug session on my script, my debug Variables window opens up several pixels wider than it was last time. I suspect it has to do with AHK V1 WinGetPos gets the full window dimensions, while the Gui Show, w%Width%... command ignores window caption and some other extra pixels.
    I use multiple monitors and Variables window is maximized on one of my monitors. Each time Variables window opens, it extends to (and covers a growing part of) another monitor which is annoying. I have to keep resizing Variables window. Anyone know of a way to fix this/automated workaround?
  • Every couple of weeks or so, my debug Variables window disappears and I can't get it back. I've tracked the problem to the "SciTE\user\SciTEDebug.ini" file. It has a section with bogus x & y params:

    Code: Select all

    [Windows]
    1=x-32000 y-32000 w382 h264, variables
    Since that's the only entry in the file, I just delete the file and my debug Variables window now comes back.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by SAbboushi » 03 Jul 2018, 12:19

Great stuff - thanks folks.

I found value in Lexicos' readme.md for DebugVars.ahk

Being able to run DebugVars.ahk using DebugVarsGui to display a separate window with a node for each running script with real-time access to view/modify AHK v1 and AHK V2 running scripts' variables (some running elevated), while debugging an AHK V2 script using SciTE4AutoHotkey with EvilC's S4AHK patch...

PRICELESS!!!!

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by slappycat2 » 10 Apr 2018, 18:38

Thanks, Lexicos! Keep up the awesome work!

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by lexikos » 10 Apr 2018, 16:39

I don't think you have anything to worry about. SciTE4AutoHotkey hasn't been updated in 3.5 years.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by slappycat2 » 09 Apr 2018, 12:30

Good stuff, Lexicos and evilC!
I really like this, but I'm worried about deviating from the standard code line. Is this change going to be "built-in" in the near future?

Thanks in advance!

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by evilC » 04 Dec 2017, 09:02

Just to clarify, I only ever see it with AHK_H. I do not see it when debugging AHK_L scripts

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by MPD » 04 Dec 2017, 08:55

confirmed - when I'm seeing the issue there are no nodes open, but quite a complex object hierarchy

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by evilC » 04 Dec 2017, 06:57

I have seen it happen with no nodes open. Sometimes it takes like up to 30 seconds to step over a line, even in a very simple script.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by lexikos » 30 Nov 2017, 16:34

The DebugVars window tends to display a lot more information than the original variable list, and requires a proportionate number of DBGp requests. If it slows down, try minimising some object nodes. (I've not seen it quite as slow as MPD described, but it may depend on the system and the amount of information displayed.)

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by evilC » 06 Nov 2017, 11:54

Yeah, I have seen similar, and I have no idea why it happens.

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by MPD » 05 Nov 2017, 08:31

This is great set of added functionality as I'm keep all my classes in one ugly file at the moment, just because of the breakpoint issue this addresses. However, I've seen an odd issue where the performance when you're debugging grinds to a halt using this version of the code.

Stepping through code on the standard 3.0.06.01 build in real-time, after this mod, often takes several seconds per F10/F11 step. Using ANSI as a platform if that matters. Happy to help provide further diagnostics if you let me know what you need

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by evilC » 14 Aug 2017, 08:52

Can you maybe submit a pull request to lexikos' repo?

Re: SciTE4AutoHotkey v3.0.06.01 Lexikos' DebugVars build [Updated 12th July 2017]

by Taurus » 14 Aug 2017, 08:19

Perfect! Thank you, EvilC and all the others.

I created a small improvement for working with F12, maybe you are interested in modifying this file:

Code: Select all

; Needs Admin-Rights for modifications
full_command_line := DllCall("GetCommandLine", "str")

if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
    try
    {
        if A_IsCompiled
            Run *RunAs "%A_ScriptFullPath%" /restart
        else
            Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
    }
    ExitApp
}

Improve_IDE:
SetWorkingDir, % "C:\Program Files\AutoHotkey\SciTE"

; Better Function/Label List (F12)
FileRead, tmp, tillagoto.properties

tmp := StrReplace(tmp, "tillagoto.gui.width=230", "tillagoto.gui.width=400")
tmp := StrReplace(tmp, "tillagoto.gui.height=12", "tillagoto.gui.height=50")
tmp := StrReplace(tmp, "tillagoto.gui.font.size=8", "tillagoto.gui.font.size=12")
tmp := StrReplace(tmp, "tillagoto.gui.sort.entries=1", "tillagoto.gui.sort.entries=0") ; no sort is better for overview, if you name one task after another with Labels

FileDelete, tillagoto.properties
FileAppend, % tmp, tillagoto.properties

Top