Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to consistently organize code for debugging?
    primarykey
    data
    text
    <p>When working in a big project that requires debugging (like every project) you realize how much people love "printf" before the IDE's built-in debugger. By this I mean</p> <ul> <li>Sometimes you need to render variable values to screen (specially for interactive debugging).</li> <li>Sometimes to log them in a file</li> <li>Sometimes you have to change the visibility (make them public) just to another class to access it (a logger or a renderer for example).</li> <li>Some other times you need to save the previous value in a member just to contrast it with the new during debugging</li> <li>...</li> </ul> <p>When a project gets huge with a lot of people working on it, all this debugging-specific code can get messy and hard to differentiate from normal code. This can be crazy for those who have to update/change someone else's code or to prepare it for a release.</p> <p>How do you solve this?</p> <p>It is always good to have naming standards and I guess that <em>debug-coding standards</em> should be quite useful (like marking every debug-variable with a _DBG sufix). But I also guess naming is just not enough. Maybe centralizing it into a friendly tracker class, or creating a robust base of macros in order to erase it all for the release. I don't know.</p> <p><em>What design techniques, patterns and standards would you embrace if you are asked to write a debug-coding document for all others in the project to follow?</em></p> <p>I am not talking about tools, libraries or IDE-specific commands, but for OO design decisions.</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload