Ok so there is no official way to properly debug anything you write...BUT you can create a log for when you program gets stuck and freezes. So thanks to dstruktiv from xbox-scene we have a way to do JUST that. All that you need to do is make this your debug.ccp or whatever extension it is (too messed up atm to tell you for sure)
Ok now that you have that how exactly is that used? Well before and after each variable add this code to your program
This creates a debug.log in the same directory as the xex you are debugging and will tell you when its getting held up.
- Code:
void debugLog(char* output)
{
ofstream writeLog;
writeLog.open("game:\\debug.log",ofstream::app);
if (writeLog.is_open())
{
writeLog.write(output,strlen(output));
writeLog.write("\n",1);
}
writeLog.close();
}
Ok now that you have that how exactly is that used? Well before and after each variable add this code to your program
- Code:
debugLog("Executable not found on specified path:");
This creates a debug.log in the same directory as the xex you are debugging and will tell you when its getting held up.