Debugging arrays
Blitz3D Forums/Blitz3D Beginners Area/Debugging arrays
| ||
I am not able to view the contents of an array in debug. Here's the code: Dim v_cubes( 1, 1, 1 ) v_cubes(0,0,0) = 9 Any idea? Thanks. |
| ||
thats odd. i seem to remember i also sometimes have problems with stuff like this, but only in debug mode. in non-debug mode it runs fine. i have no idea what causes it either. does it give an array index out of bounds? |
| ||
The following debug log lines: Dim v_cubes( 1, 1, 1 ) DebugLog v_cubes(0,0,0) v_cubes(0,0,0) = 9 DebugLog v_cubes(0,0,0) do output: 0 9 Looks like the array is fine, I simply cannot debug it. Bugger. |
| ||
odd... i can debug it fine. tried restarting IDE/pc? |
| ||
If you mean that you can't see the contents of an array in the debugger - no you can't! It'd be hugely complicated to do that for multi-dimensional/large arrays. The best you can do is to write a simple function to either dump the contents of the array into a file, or into the DebugLog (as you're already doing). |
| ||
GFK: that's exactly what I meant! Ok, so it is not possible see array contents in debug. Fair enough. Thanks everyone for you replies! |
| ||
Maybe, for debug purposes, you can copy the array contents into a simple variable, and then THAT should show in debug mode:Dim v_cubes( 1, 1, 1 ) v_cubes(0,0,0) = 9 my_vcubes = v_cubes(0,0,0) |
| ||
I think I'm gonna go with a dump in the debug log. I really need to see the whole array data in a single glance. Thanks! |
| ||
i thought this had something to do with the arrays work fine in none debug mode, but give an error in debug mode... i get that problem sometimes :/ |