autohotkey-plus
autohotkey-plus copied to clipboard
The contents of array are displayed incorrectly
vscode 1.51.1 / vscode-autohotkey 2.60 / ahk 1.1.33.02
#Requires AutoHotkey 1.1.33+
#Warn All
#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
array := {}
; --- Something strange
; array[99] := "some value"
; array[100] := "now see debugger"
; Debugger show:
; ...
; array: Array(100) <-- ? incorrect array size ?
; [99]: some value
; [100]: now see debugger
; ...
; --- Something strange
array[100] := "some value"
array[101] := "now see debugger"
; Now debugger show:
; ...
; array: Array(101)
; [0..99]
; [1]: some value
; [2]: now see debugger
; [100..100]
; ...
Can someone confirm or deny it? Because now i checked on vscode 1.49.3 and above / vscode-autohotkey 2.4.8 and above. And i've been getting this bug everywhere. But i do remember that before the 1.51 update (about a week ago) everything worked fine.
I no longer develop the debugger function, I suggest you try additional installation vscode-autohotkey-debug
Yes, I can confirm that I see the same behaviour, but I'm a novice regards fully understanding arrays and objects etc.
Sorry, didn't notice cweijan had already replied, but I also see the same behaviour with vscode-autohotkey-debug.
array1:={99:"99",100:"100"}
array2:={100:"100",101:"101"}
pause ; <- set breakpoint here
Exit
fade2gray many thanks. I thought i was the only one who have this bug. cweijan I already tried 'vscode-autohotkey-debug' - same bug. Anyway, ty for the great extension.
@cweijan
I no longer develop the debugger function, I suggest you try additional installation vscode-autohotkey-debug
Does this mean you might pull the debugger functionality altogether?
As it is, I can't run vscode-autohotkey-debug whilst using AutoHotkey Plus because of the conflicting configuration type (autohokey vs ahk) in the launch.json file - which you suggested I customize here #40.
Hi @FMarks, if you want this issue fixed in the main extension, please open an issue in my fork, and I'll look into it! It is published in VS Code as "AutoHotkey Plus Plus", and it includes all the features of this extension, plus some bugfixes and readability enhancements.

array: Array(101)
- [0..99]
- [1]: some value
- [2]: some value
- [3]: now see debugger
- [100..100]
Slightly different than described, but still a bug