NoDebug

BlitzMax Forums/BlitzMax Programming/NoDebug

Perturbatio(Posted 2005) [#1]
What does it do?

My guess is that it prevents you compiling a debug version, but why would you want to?


Mark Tiffany(Posted 2005) [#2]
Pretty sure it turns off debug for a nominated function, e.g.
Function MyOftenCalledFunctionThatWouldBeReallySlowInDebugMode() NoDebug

So if you have a routine that you call a lot, and just *know* it works, you can force no debugging for it, even in debug mode. Handy for testing.


Perturbatio(Posted 2005) [#3]
Hmmm, yes it does appear to do that, although I've seen it at the top of a module as well, so it looks like it can be used for an entire file too.

However, this code, when compiled in debugmode, will still do a debugstop just not inside the function, should it?

Graphics 640,480,0,0

While Not KeyDown(KEY_ESCAPE)
	Cls
	
		DrawBox()
		DrawCircle()
		
	Flip
Wend
End

Function DrawBox() nodebug
	DebugStop
	DrawRect(0,0,100,100)
End Function


Function DrawCircle()
	
	DrawOval(200,200,100,100)
End Function



Mark Tiffany(Posted 2005) [#4]
It certainly doesn't seem right, assuming our interpretation is correct!


Perturbatio(Posted 2005) [#5]
It certainly doesn't seem right, assuming our interpretation is correct!


Well if you add DebugStop to the second function, it does stop there so it appears to work for individual functions.