09-03-2014 03:59 PM
Hi All,
I've always understood that when preparing software for final release and delivery that it should be done using the Release configuration. That's the way all other companies deliver their software, so it just made intuitive sense to me. However, I've recently come across a project that developed and released all of their software modules using the Debug build configuration, and the rationale that I was given was that it makes debugging easier when troubleshooting problems after release. Now we're planning to leverage this software for a new project, and I'm not sure I am willing to support this rationale. Beyond the reason of "because I said so!", there are several reasons why I think this is not a good idea:
1. It's slower to execute Debug Code; although for what we're using it for (drivers and Utilities mostly) this is negligible.
2. There's a potential for issues to occur due to the debug code causing errors or being out of date.
3. There could be differences between the debug and release configurations (not the least of which is the use of the _CVI_DEBUG_ macro to include additional debug code).
4. Also if I recall correctly, in order to debug properly, the source code needs to be available; and this to me is a big fat giant no-no for a production environment.
So beyond the reasons I cited above, and assuming that they are all valid, can anyone provide additional reasons for or against this practice? Any comments would be extremely helpful!Thanks!
-Jack
Solved! Go to Solution.
09-03-2014 11:49 PM
Hello Jack,
what you say and the items you point out are true and reasonable, with the exception of item #4: the code must absolutely be available in order to debug the application, but not necessarily on the production machine. I mean, you can enable remote debugging of the application, leaving the production machine as is and remotely connecting to it on TCP as described in this white paper.
Nevertheless, at the end of debug process the application should be compiled as release executable and deployed to the production machine for the good reasons you already listed.
09-04-2014 01:43 AM
09-04-2014 06:07 AM - edited 09-04-2014 06:10 AM
Hello Jack,
It's indeed surprising that the company decided to ship builds in debug configuration.
Here are a few more other reasons why delivering debug builds isn't a good practice:
There are other alternatives to debugging shipped binaries and perform diagnostics on them:
Also, as ebalci mentioned, you should make sure you test your release build thoroughly, before shipping.
Regards,
- Johannes
09-04-2014 06:53 PM
Thanks for the feedback!
09-25-2014 01:48 PM
10-08-2014 07:42 AM
If you learn to swim with floaties, why would you take them off when you want to swim across the Channel ?