Separate ‘debug’ and ‘release’ builds?

Having separate debug and release builds is a good idea, because it does make development easier.

But debug builds should be for development only, not for testing. You test release builds only. And you don’t use developers to test those builds, you use testers.

It’s a simple policy that gives the best of both worlds, IMO.

Edit: In response to a comment, I think it’s obvious that debug and release builds (can) generate different code. Think “-DDEBUG” vs. “-DNDEBUG”, and “#if defined(DEBUG)”, etc.

So it’s vital that you test the code that you end up shipping. If you do generate different code in debug and release builds, that means testing twice – regardless of whether or not it’s tested by the same person.

Debug symbols are not that big an issue, however. Always build with debugging symbols, keep a copy of the unstripped binary, but release a stripped binary. As long as you tag each binary with a build number somehow, you should always be able to identify which unstripped binary corresponds to the stripped binary that you have to debug…

How to strip binaries and load symbols in your debugger from an external source is platform-dependent.

Leave a Comment