I want to put my message box days behind me and start using a debugger.
My Test.ahk script content consists of:
Code: Select all
#Warn, All, OutputDebug
#SingleInstance, Force
;OutputDebug, Hello, World
MsgBox, Hello, World
F5::F12 ;Just to keep script active, I guess
I have covered some ground, but I am suffering from an issue.
Run without debugging
If I try to run the script without debugging (Main menu: Run> Run Without Debugging), on first run it will work but on second run I will get xxxxx error message.
- If click on Cancel then THIS error message pops up, Vscode open a new tab titled Launch.json
- If click on Yes, then THIS error message pops up, "Script is already running" but my script already has #SingleInstance, Force. I would much prefer if the script is just reloaded.
Start Debugging
When Start debugging (Main menu: Run> Start Debugging), on first run it will work but on second run I will get THIS error message, when I click cancel
Then THIS error message pops up, finally. Vscode open a new tab titled Launch.json
I set out to try and understand what is happening, reading the documentation for the debugging extension I am using, Zero-Plus -- vscode-autohotkey-debug, it mentions a solution for this issue:
And also:A port to be assigned to the debugger. Basically, you don't need to change it, but if you want to debug more than one at the same time, you need to set different ports for each.
default: 9002
but I am stuck on configuring the Launch.json file from the ground up, to use "start-end" and "9002-9010" optionsIf a port is already in use, a confirmation message will appear asking if you want to use a different port. If this message is annoying, you can give the debug adapter permission to use the port using the "start-end" format.
e.g. "9002-9010"
Amongst the many things I tried in the Launch.json are:
Code: Select all
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
"Start-end" : {"9002-9010"}
\\ "Start-end" : "9002-9010
\\ 9002-9010
]
}
Has anyone come across this issue before?
I would simply like for the script to be reloaded and avoid all this message boxes. Ironically enough, this is what I set out to avoid.
Any help would be wonderfull.