Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V 3.1.0: Minor debugger improvements? #279

Closed
fade2gray opened this issue Nov 23, 2022 · 5 comments · Fixed by #333
Closed

V 3.1.0: Minor debugger improvements? #279

fade2gray opened this issue Nov 23, 2022 · 5 comments · Fixed by #333
Assignees
Labels
bug something isn't working debugger issues with debugging code

Comments

@fade2gray
Copy link

Ref: #275

As soon as I run the debugger, the console opens with...
C:/Program Files/AutoHotkey/AutoHotkeyU64.exe /ErrorStdOut /debug=localhost:9000 c:\Users\fade2gray\Desktop\ahk\test.ahk

If I close the console and then attempt to close the debugger with either Ctrl+F5 or the red button, the console reopens to inform that The debugger has stopped; I then have to use Ctrl+F5 or the red button again to close the debugger.

This wasn't an issue pre 3.1.0.

@mark-wiemer
Copy link
Member

mark-wiemer commented Nov 24, 2022

Hey @fade2gray, I'm not able to repro this. I am able to debug this script and stop it with Shift+F5 and the red square consistently, even when the output console is closed.

In this repro video, I typed ctrl+F5 but it turns out "stop debugging" is bound to shift+f5 for me. Could this be the issue?

If you can, I've found Windows Game Bar + OneDrive to be a super easy way to share screen recordings.

Here is the script I ran:

; Select the following line and hit `Ctrl + F8` to run selection
f1:: MsgBox, You hit F1

; The F2 hotkey will not work because it was not part of the selection
f2:: MsgBox, You hit F2

And here's me debugging it. Looks like the recording didn't actually work out so well. You can't see the message boxes when I press F1 and F2 but I promise they appear. And when I hover over the red square at the end there is a tooltip that says "shift+f5" and I use that keybinding to stop the debug session. I don't click the red square at the end of the video

Some thoughts:

  1. Could you have other extensions interfering? AHK+ or the other AHK debugger?
  2. Are your keybindings correct?

@fade2gray
Copy link
Author

fade2gray commented Nov 26, 2022

Hi Mark, my mistake, the keybinding is Shift+F5 and not Ctrl+F5 as first stated.

I see exactly the same behaviour as in your video when running the debugger with your example script, but this is what I see when running a simple script with a breakpoint.

Code:

ahk := "AutoHotkey" ; breakpoint here
ExitApp
2022-11-25_20-44-11.mp4

@mark-wiemer
Copy link
Member

OK, thanks for this great repro video! I should have this one fixed in a few days. Testing debugger changes is difficult due to some VS Code issues -- I have to "debug" the new code itself and then run a debugger against that, and VS Code doesn't like doing that :P otherwise it looks like a simple change and we have the v3.0 code to compare against. Thanks again for this report!

@fade2gray, can I ask what software you're using to record your screen?

@fade2gray
Copy link
Author

fade2gray commented Nov 26, 2022

Screen recorder: a very old version (11, possibly 2011) of TechSmith Snagit.

Whilst on the subject of the debugger, would it be possible to add an options setting to suppress the console altogether, I seem to remember someone asking a similar question a few years back - may have been in AHK plus?

@mark-wiemer mark-wiemer added bug something isn't working debugger issues with debugging code labels Dec 3, 2022
@mark-wiemer
Copy link
Member

#70, perhaps? Anyway, sorry I haven't gotten to this one yet. Most of my time on this project is spent improving the engineering quality of life so I can review changes from other folks. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working debugger issues with debugging code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants