Debugger becomes un-usably slow when using large-ish arrays

Previous topic - Next topic

AndyH

I'm finding that when using arrays the debugger becomes unusable because it is so slow.

For exaggeration purposes, here is a large array:

DIM t[160][160]

Was thinking of using it to store a level 160 tiles across, 160 down - a lot of array elements.  The debugger upon pressing F10 to go to the next line will refresh the Variables panel in the editor each time and I guess is having to update each element in this array.  It can take a few seconds.

Can you optimise this?

Maybe only update the parts of the arrays that are expanded so you don't have to rebuild such large structures?  When the user clicks the + to expand a node in the array you could fetch the part required for that to help speed things up?

Jamagic's debugger (a long dead programming language) allowed an option in the project settings to force the debugger to show NO variables unless you placed some special debugger commands in your source to tell it to add a specific variable to the debugger watch list.  Maybe you could do something similar?

Kitty Hello

Excellent idea. I have a project options variable, where you can specify maximum array size in debugger. Very clever.

AndyH

That works much better.  The good thing is, like types, I can just dump out contents of an array to the output window if needed, but you can still set it to show the first n number of elements too.

Thanks Gernot!