[lazarus] Better proposition for debug code.

Baeseman, Cliff Cliff.Baeseman at greenheck.com
Wed Jul 21 10:09:40 EDT 1999


The debugging stuff should really be in the gtkint unit if you ask me we can
treat it just as we do any other component code. This would allow other tool
kits to implement how and where that type of thing is displayed.

Cliff

-----Original Message-----
From: michael at tfdec1.fys.kuleuven.ac.be
[mailto:michael at tfdec1.fys.kuleuven.ac.be]
Sent: Wednesday, July 21, 1999 8:16 AM
To: lazarus at miraclec.com
Subject: Re: [lazarus] Better proposition for debug code.




On Wed, 21 Jul 1999, Michael A. Hess wrote:

> Michael Van Canneyt wrote:
> > 
> > Hello,
> > 
> > May I remind you that the compiler supports the ASSERT() construct of
Delphi;
> > that you can specify a
> >   AssertErrorProc
> > which takes care of the asserts ?
> > 
> > This means that you can have the whole debug class stuff without the
> > juggling with macros.
> > 
> > Just do a
> > 
> >  Assert(False,'Some debug message');
> 
> But doesn't the Assert abort the application after it is called? We want
> to use the debug as a tracing feature to give us processing out of the
> code as it runs. This would print the Assert line and stop. Or am I
> misunderstanding how Assert is used in FPC?

This is the default behaviour; if you set the procedural variable
'asserterrorproc' then you can customize the behaviour; the application just
continues after the assertion handler.

careful; the systutils unit sets the handler, and turns it into an
exception. you must be sure that sysutils doesn't override your handler.
(normally, it should not)

Michael.

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list