Re: Line number for debugging

From: David Knaack (davidknaack_at_cox.net)
Date: 11/10/03


Date: Mon, 10 Nov 2003 09:23:54 -0600

John Leavey wrote:
> On Mon, 10 Nov 2003 09:35:19 -0500, "Pascal Boivin" <pboivin@nbautomation.com> wrote:
>>In C++, I was using
>>#define TRACEPROC() TraceProcedure(__FILE__, __FUNC__, __LINE__ + 1)
>>to save the current position in the source into global variables. When a
>>exception occurs, I was showing those values to help me find the problem.
>>
>>Is there something equivalent in Delphi?
>
> The easiest way in Delphi requires the building of detailed .map files.
>
> See http://www.undu.com/Articles/010729d.html for an article and sample code on how to use
> this map file in an exception handler to display routine name and line number.

The other option I've heard of, but never seen, is to define an
OpenToolsAPI virtual file system that modifies the source that is fed to
the compiler, changing macro defs into the current line number or date
or whatever.

DK



Relevant Pages

  • Re: Line number for debugging
    ... I was showing those values to help me find the problem. ... The easiest way in Delphi requires the building of detailed .map files. ... this map file in an exception handler to display routine name and line number. ...
    (borland.public.delphi.language.objectpascal)
  • Re: D9 rant...
    ... Delphi 2005 Update 1 Fixes ... used they conflict with the Delphi types Pointer and Exception. ... * Access violation occurs in dccil90.dll on second compile in the ... package lists. ...
    (borland.public.delphi.non-technical)
  • Re: Been a slice...
    ... File system changes don't sound like errors, ... > nicely with RAD and VCL developement. ... involves objects during exception handling. ... > causing too much havoc with the basic Delphi functions... ...
    (comp.lang.pascal.delphi.misc)
  • Re: Exception Handling...
    ... just windows. ... remapped from windows codes to delphi codes to get ... them on to the "unhandled exceptions" handler. ... >exception handler be located. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Cargo cults and the taxonomy of incompetence
    ... on E: exception do DecideRetry; ... differently in DecideRetry by forking on different Exception descendents, ... programmer who hated Delphi, why they were going to do it this way, he said it ... about programming, so they read no programming books, magazines or websites ...
    (borland.public.delphi.non-technical)