We are currently in the process of converting the website to the new design. Some pages, like this one, are still broken. We appreciate your patience.
Handmade Network»Forums
235 posts
Question on Casey's Debugging code
Edited by Jason on
I've been watching some of the debug/profiling videos and in the beginning Casey was using static array's for each translation unit with the __COUTNER___ macro specifying the size of the arrays. At some point Casey had a bug with this setup and he talked about switching this to a different method. I've watched a few more of the debugging videos but he hasn't mentioned this again. Does he end up changing this scheme to something else? If so, just curious as to what he ends up doing instead (or if you know the video where he does actually end up refactoring this). I ask because I want to try and create a system of my own
Pascal Beyer
11 posts
Question on Casey's Debugging code
I think he is generating unique strings as "DEBUG_NAME" (concatinating file and line).
Then he just writes every event atomically into a buffer. At the end of every frame he goes through the buffer and "CollateDebugRecords", to figure out whatever he is interested in.

If you haven't, I recommend buying the source and looking at it yourself.