On Fri, 31 Oct 2008, Pritpal Bedi wrote:

Hi Pritpal,

> How can I invoke 
> HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Redraw(%p,%d,%d,%d)", pGT, iRow, iCol,
> iSize ) );
> to work ?

read doc/tracing.txt

Short instruction. Compile the code you want to trace with
HB_TR_LEVEL_DEBUG macro, f.e.:
   set C_USR=-DHB_TR_LEVEL_DEBUG

Before you run your application set HB_TR_LEVEL envvar to HB_TR_<level>,
f.e.:
  SET HB_TR_LEVEL=HB_TR_DEBUG
Do not set this variable if you recompile whole Harbour code with
HB_TR_LEVEL_* macro or the .prg files compilation will also be traced.
Use HB_TR_OUTPUT envvar if you want to redirect output to file.

> Also can this debug output be directed to outer debug engines, 
> I mean same as I can achieve with hb_ToOutDebug() function ?

I do not now hb_ToOutDebug() function. By default HB_TRACE send output
to stderr and can be redirected to file. You can also run your application
from parent process which redirects STDERR.

I guess you want to trace GUI application. You can also use MinGW mixed
mode. Just simply link Harbour application without -mwindows switch then
execute it from console window. STDOUT/STDERR will be automatically
redirected to this console so you can use simple printf().

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to