GithubHelp home page GithubHelp logo

Comments (6)

fade2gray avatar fade2gray commented on June 6, 2024

Works for me. You are using F9 to initiate debugging and stepping through with F11?

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 6, 2024

I was able to reproduce if my file was just the three lines included in the snippet. However, when I added a fourth line MsgBox % var2 the debugger did stop at breakpoint 2 on the third line. Since a breakpoint at the end of a file with an unused assignment (var2 is not used later in the file since it is assigned at the end of the file) isn't a very useful breakpoint, this is low priority. Please inform if you are seeing this issue with slightly more complicated files, or breakpoints after #include but before the very end of the file.

from ahkpp.

digitalAssetStore avatar digitalAssetStore commented on June 6, 2024

Yes, I have scripts with many #includes and after that lines of code with definitions for other HotKeys and function methods that I need to debug.

The following seems to be the case
a) If #include doesn't define any HotKey
--> stops correct at "breakpoint 2"

b) If #include defines any HotKey(s)
--> NOT stopping at "breakpoint 2"

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 6, 2024

Can you provide a short sample script for reproduction purposes @digitalAssetStore?

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 6, 2024

Hi @digitalAssetStore, since I'm not able to reproduce this issue, I'm going to close it for now. If you can provide a sample script, I'll consider re-opening. Thanks

from ahkpp.

mark-wiemer avatar mark-wiemer commented on June 6, 2024

I've edited my repro setup, I can indeed reproduce this.

; included.ahk
foo() {
    MsgBox % "Hello world"
}

x::
    MsgBox % "Does it work when included script contains a hotkey?"

; main.ahk
; [Issue #60](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/60)
var1 := 1 ; <-- set breakpoint 1
#include included.ahk
var2 := 2 ; <-- set breakpoint 2
MsgBox % var2

When debugging main.ahk, I see the following:

  1. Debugger stops at breakpoint 1 correctly
  2. Debugger does not hit breakpoint 2 right away, even expected though it's expected to. Instead, the script keeps running
  3. When triggering the hotkey (by pressing x), the hotkey works as expected
  4. Once the hotkey finishes triggering (by closing the message box), debugger hits breakpoint 2

Honestly, I'm not quite sure what the expected behavior is. @digitalAssetStore , I recommend you try using zero-plusplus.vscode-autohotkey-debug in the meantime.

Apologies for the inconvenience and great delay in thoroughly investigating this issue.

from ahkpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.