Debugging with AutoHotkey Plus Plus

Scripting and setups with Visual Studio Code (vscode) and AutoHotkey.
User avatar
kdaube
Posts: 86
Joined: 02 Nov 2015, 03:11

Debugging with AutoHotkey Plus Plus

Post by kdaube » 08 Mar 2023, 12:49

launch.json is this:

Code: Select all

{
    "version": "0.2.0",
    "configurations": [
      {
        "name": "AutoHotkey Debug",
        "type": "ahk",
        "request": "launch",
        "runtime": "H:/Utilities/AutoHotkey/AHK2/AutoHotkeyU64.exe",
        "program": "${file}",
        "stopOnEntry": true
      },
   ]
}
The debugging client is AutoHotkey Plus Plus. Vscode marketplace reports its version as 1.11.0, but in vscode > Extension the version is reported as v3.2.0 (so what is the status of it?)
I have installed AHK v2 according to the recommendations, that is
  • V2 is located in H:\Utilities\AutoHotkey\AHK2
  • V1 is located in H:\Utilities\AutoHotkey\AHK2\v1.1.36.02
  1. I can debug v1 scripts. The small triangle top right opens its popup menu correctly
  2. For a v2 scripts nothing happens on F5 (whether there is a #Requires AutoHotkey v2.0 or not).
    The small triangle top right opens on click and closes immediately
    F11 maximises the window to the whole screen estate - so obviously we are not in debug mode.
    I get the message «AutoHotkey execute bin not found: C:\Program Files\Autohotkey\v2\AutoHotkey.exe»
→ What is wrong with my setup?
Klaus Daube, Zürich, CH

markwiemer
Posts: 3
Joined: 13 Mar 2023, 23:59
Contact:

Re: Debugging with AutoHotkey Plus Plus

Post by markwiemer » 14 Mar 2023, 00:04

Hi, maintainer of AHK++ here. What is your execute path in settings (Ctrl+,)?
image.png
image.png (7.43 KiB) Viewed 1748 times
I will say I don't usually use a `launch.json`, I just rely on the execute path setting and update it for v2 or v1 based on what workspace I have.

You're also welcome to open a discussion on GitHub, where I'm more active!

Post Reply

Return to “Visual Studio Code”