Debugstop is your friend :)

BlitzMax Forums/BlitzMax Beginners Area/Debugstop is your friend :)

*(Posted 2009) [#1]
After getting miffed at my game ( Elite Multiplayer) for a time due to a error I kept getting I decided to 'read the manual' as you do, well I came across Debugstop after putting this in the offending function I located the error that was throwing up major problems in one cycle.

Yes you may have to step through max's whole source lists but if it locates that error thats been bugging you for ages then why not. Even old coders like me have to read manuals sometimes ;)

And yes sometimes even I feel like a noob :)


GfK(Posted 2009) [#2]
If KeyHit(KEY_X)
    DebugStop
EndIf
I sometimes don't want the code to stop on any particular iteration. Plus, once I'm done looking through the debugger, I can set the program off running again, then go back into the debugger again later.


ImaginaryHuman(Posted 2009) [#3]
Don't feel too bad EdzUp[SD] .. I also had no knowledge of the ability to get dubugging information live, or debugstop, or being able to step through in the editor, etc, until maybe a month or two ago. Now it's pretty handy, but out of habit I still tend to throw in a bunch of Print commands in the likely section of problem code.

Nice idea there Gfk about optional stopping.


*(Posted 2009) [#4]
thanks guys, gfk thats a good idea there :)