Debugging?

BlitzMax Forums/BlitzMax Beginners Area/Debugging?

jankupila(Posted 2010) [#1]
I didn't find from all topics how debugging works. Could someone tell me how?

Last edited 2010


Czar Flavius(Posted 2010) [#2]
Put the DebugStop command in your program, and when it comes to it it will take you back to that line of code. You can use the debugging window to view the values of your variables, and use Step buttons to step through your code line by line. Step In when you are on a function will take you inside that function, or use Step Over to skip that function and go to the next line.

Debugging is very useful for seeing what your program is actually doing and finding errors. For example, if you have a function that takes a number and for the number 5 is not giving the right output, put at the start of the function If InputVariable = 5 Then DebugStop, and you can see line-by-line what is going on.

There are a few other things but that pretty much sums it up. Make a simple program with a DebugStop and experiment. :)


jankupila(Posted 2010) [#3]
Thanks.