PDA

View Full Version : Debugging EurekaLog


Hugo Olsen
05-Oct-2005, 02:19 PM
Hi,

I want to debug/single step through the EurekaLog
to find out why I can't send mails.

To be able to debug the code I've found out that
I must set a conditional: DUNIT

After setting this conditional and recompiled, I
was now able to set breakpoints in for example
ExceptionLog.pas, but line number wasn't matching
the source file. There was some kind of offset in
linenumbers. (See attached screen-dump: image_before.png)

After scratching my head for some time, I remembered
I have seen this before. If the lines in a source
file aren't terminated properly by carriage-return/
line-feed but only by line-feeds (as in real operating
systems!), delphi (at least in delphi 5) has this
strange behaviour.

By looking at ExceptionLog.pas with a hex-viewer I
also found some lines that was only terminated by
line-feeds. With a homemade tool I converted
ExceptionLog.pas into a correct CR+LF file, and
recompiled my program. And now it all looked correct
(See attached screen-dump: image_after.png)

Hugo

admin
06-Oct-2005, 10:00 AM
Hugo Olsen wrote:
> Hi,
>
> I want to debug/single step through the EurekaLog
> to find out why I can't send mails.
>
> To be able to debug the code I've found out that
> I must set a conditional: DUNIT
>
> After setting this conditional and recompiled, I
> was now able to set breakpoints in for example
> ExceptionLog.pas, but line number wasn't matching
> the source file. There was some kind of offset in
> linenumbers. (See attached screen-dump: image_before.png)
>
> After scratching my head for some time, I remembered
> I have seen this before. If the lines in a source
> file aren't terminated properly by carriage-return/
> line-feed but only by line-feeds (as in real operating
> systems!), delphi (at least in delphi 5) has this
> strange behaviour.
>
> By looking at ExceptionLog.pas with a hex-viewer I
> also found some lines that was only terminated by
> line-feeds. With a homemade tool I converted
> ExceptionLog.pas into a correct CR+LF file, and
> recompiled my program. And now it all looked correct
> (See attached screen-dump: image_after.png)
>
> Hugo

Thank you very much for your good feedback Hugo! :)

I have created an automatic tool for fixed all this eventual issues
before compile the final EurekaLog version! ;)

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.