#iidef and #define to debug program



Hi,

I am preparing project for submission and i'd like to allow the print
out of debug messages. I know that with something like

#define DEBUG

#ifdef DEBUG
print(X);
#endif

you can print out comments in an effective way.. however, can these
#define be sent through the command line, in form of a paramterer?

I mean, something like

%program_name param1 param2 (#define DEBUG)

thanks,
Fernando

.



Relevant Pages

  • Re: Null exception error and general tidying of code..
    ... >> decent standard before submission.. ... >> Simon Mansfield ... > programming courses and books don't teach how to debug. ...
    (comp.lang.java.help)
  • Re: #iidef and #define to debug program
    ... I am preparing project for submission and i'd like to allow the print ... out of debug messages. ... no. Preprocessin directives are a *compile* time thing. ...
    (comp.lang.c)
  • Re: [RFC PATCH 26/26] UBIFS: include FS to compilation
    ... We will think how to lessen the amount and granularity of this. ... Surely that judgement should be made by people who actually debug UBIFS. ... need for granulated debug messages. ...
    (Linux-Kernel)
  • Re: WinCE boot up
    ... Debug messages are output without intervention from the CE drivers. ... it was possible to sent the debug output to the screen as ... The hardware which I have does not have the serial port, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Unable to get debug message which is in kernel
    ... kernel image on to the target and I have ensured that ARMInit function ... I don't get the debug message " ARMInit done" printed on the ... and I get the debug messages which are in bootloader code but I don't ... I take it that you have no JTAG debugger? ...
    (microsoft.public.windowsce.platbuilder)