autohotkey-plus icon indicating copy to clipboard operation
autohotkey-plus copied to clipboard

The contents of array are displayed incorrectly

Open FMarks opened this issue 4 years ago • 7 comments

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]
; ...

FMarks avatar Nov 17 '20 16:11 FMarks

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.

FMarks avatar Nov 19 '20 09:11 FMarks

I no longer develop the debugger function, I suggest you try additional installation vscode-autohotkey-debug

cweijan avatar Nov 19 '20 13:11 cweijan

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

AHK-debugger

AHK-debugger-2

fade2gray avatar Nov 19 '20 14:11 fade2gray

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.

FMarks avatar Nov 19 '20 15:11 FMarks

@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.

fade2gray avatar Nov 30 '20 18:11 fade2gray

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.

mark-wiemer avatar Feb 05 '21 21:02 mark-wiemer

image

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

mark-wiemer avatar Dec 03 '22 04:12 mark-wiemer