zero-plusplus / vscode-autohotkey-debug

https://marketplace.visualstudio.com/items?itemName=zero-plusplus.vscode-autohotkey-debug
53 stars 4 forks source link

Files loaded with `/include` will not appear in Loaded Scripts #279

Open zero-plusplus opened 1 year ago

zero-plusplus commented 1 year ago

Debugging directives, etc. that depend on Loaded Scripts will not work.

PythonYunfei commented 1 year ago

An essential question, before you start doing it: Will /include be shown in the same window with the main script? I'm afraid you should cancel it if haven't started yet, because '/include' files is in front of the main script not behind, and it may be shown in another file. Thanks any more. It is a little pity but I have to tell you in advance. I will not reopen the issue unless I come up with a new appropriate idea.

zero-plusplus commented 1 year ago

Scripts loaded with "/include" will appear in Loaded Scripts like other scripts.

PythonYunfei commented 1 year ago

It will be good if it is like that. Also, can OnExit(__OnExit__) automatically be removed to prevent a duplicated loading with OnExit(__OnExit__), when I debug once again? By the way, I have made a mistake in the afternoon of my prior reply:

Be better to add ExitApp() like below to forcibly invoke Breakpoints Debugging, in case of any hotkeys being given and keeping the script without quitting:

; v2.0.0
ExitApp()
OnExit(__OnExit__)
__OnExit__() {
  ; @Debug-Breakpoint
}

ExitApp() must not be used, because I need to press hotkeys once I introduce a hotkey, while ExitApp() is against the demand. It will be just perfect without it like this:

; v2.0.0
OnExit(__OnExit__)
__OnExit__() {
; @Debug-Breakpoint
}

And of course, this should be combined with my current addition in the prior issue:

In addition, be better if can add a judgment: if any breakpoints are set by users self, /include will not work, to avoid unnecessary file including.

Wait again.😜

zero-plusplus commented 1 year ago

I don't think /include will include the same script only once, so there will be no duplication.

If you re-run the debug, it will be loaded again from scratch, so there will be no duplicates due to that.

PythonYunfei commented 1 year ago

I don't think /include will include the same script only once, so there will be no duplication.

If you re-run the debug, it will be loaded again from scratch, so there will be no duplicates due to that.

Quite well.