Debugging Fun
by Frank Carney · in Torque Game Engine · 10/08/2006 (4:12 pm) · 0 replies
Here is something I am playing with:
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.
// 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 Started programming in HS and have never stopped. Now an 18 year vet of programming anything from assembler on a NES console to a nuclear waste processing system. If it can be programmed I may have tried to program it!