Game Development Community

Debugging Fun

by Demolishun · in Torque Game Engine · 10/08/2006 (4:12 pm) · 0 replies

Here is something I am playing with:
// debug code, should be somewhere else besides this object
void debugBreak()
{
   Con::printf("Use this function in a debugger to break execution at will.");
}

ConsoleFunction(debugBreak, void, 1, 1, "() - Code breaker man!")
{
   // This is a function that can be setup to break execution.
   debugBreak();
}

I feel like Neo!

Just break on the debugBreak() function so that you can just type in or assign to a keypress. Nice way to stop the code when things get slow so you can manually go in and set other breakpoints.

About the author

I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67