Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on August 28, 2002, 10:43:52 pm

Title: debug spew
Post by: Bobboau on August 28, 2002, 10:43:52 pm
I was wondering how do I add stuff to the debug spew?
like if I want to make sure a value is set to what I think it should be at a certan time, it'll get tossed up out into that little window and\or the log
also anything about the debug spew I should know, like what all goes into the Debug_filter.cfg

and post anything alse along the line of debug stuff too
Title: debug spew
Post by: penguin on August 29, 2002, 10:16:22 am
1. you have to use the debug version; it's not compiled into the release builds

2. use the mprintf macro.  It works like printf(), except you must double your parentheses:
Code: [Select]

mprintf(("%i frames executed in %7.3f seconds, %7.3f frames per second.\n",
      Framecount,
      cur_time - Start_time,
      Framecount/(cur_time - Start_time)
));

I fixed an issue that was preventing it from being written to the logfile, it might be related to the Debug_filter.cfg file -- I assumed we can write everything to the file, and filter afterwards...