Re: Debug vs. Release build in Delphi?

From: Ray A. (nospam_at_hotmail.com)
Date: 03/24/05


Date: 23 Mar 2005 15:31:22 -0800

Alan Garny wrote:

> Hi,
>
> I was wondering what you guys' approach is when it comes to
> generating either a debug or release version of your application. My
> project options are currently such that I can generate a full debug
> version of my application. This said, whenever I want to generate a
> release version, I have to go to the project options and select the
> optimization box, unselect the debugging ones, etc. So yes, not
> really ideal... So, is there a way that would allow me, through the
> use of a swtich/conditional define/etc. to let me generate either a
> debug or release version of my application?
>
> Cheers, Alan.

I found building a simple build program very helpful.

Using debug and production templates for *.dof, *.cfg, *.rc, *.dpr,
*.dpk files, I have a build manager program rewrite the project options
and toggle directives as necessary if I select to make a production or
debug build.

I find that a very important feature to prevent "rouge" project options
from making it into the production build. It also gives the developers
some freedom to use whatever options they need without having to worry
about what will happen when the production manager goes to make a build.

The build program will then create the necessary batch file and run the
resource and command line compiler for selected projects and spit out a
log file so the compile status can be reviewed.

Combine an include file with directives defined for debugging and you
have a simple but effective solution for only, at most, a few days of
work to build the build program.

Note I think it is wise to generate all debug files to different
folders than the production files in order to keep the production files
stable.

It's also a good idea to compile programs that go out on only one
designated production computer. Doing otherwise is inviting disaster.

Ray A.



Relevant Pages

  • RE: Development tools: where to? (Long)
    ... >> development tool from an old Informix user. ... >> debug and other features but it is still under development. ... I don't like web user interfaces, ... >> stage for production sites. ...
    (comp.databases.informix)
  • Re: PAPI in the ports
    ... any performance measuring does or must stress ... performance tests on a production server is not the very best idea. ... But to have a such feature on a production system is ... If I get a problem I can easily debug ...
    (freebsd-performance)
  • Re: ASPX processing time..
    ... Very good point as I was putting debug build in production. ... Can you please tell me which profiler you are referring to.... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Ngen, release vs. debug, /optimize flag
    ... debug build is for development. ... markedly different from production because the framework forces variables to ... > couldn't find any useful articles so far. ...
    (microsoft.public.dotnet.framework.performance)
  • Re: debug console app using scaffold exe?
    ... pretty sure that the project options let you specify the executable for ... resembles "Debug Executable" in your project options/settings. ... It's easy enough to use a separate executable when debugging a dll, ... Legacy browsers never heard of emerging standards. ...
    (microsoft.public.vc.debugger)