[DUG] Stack print in Delphi with thread

Leigh Wanstead leighw at softtech.co.nz
Tue Jul 25 13:41:05 NZST 2006


Hi Paul,

This code goes to customer machine which does not have Delphi debug
environment.

Regards
Leigh

-----Original Message-----
From: Paul McKenzie [mailto:paul at smss.org.nz]
Sent: Tuesday, 25 July 2006 1:35 p.m.
To: leighw at softtech.co.nz; NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Stack print in Delphi with thread


Can you not just jump to the different threads via the Debug window Threads
...

Regards
Paul McKenzie
Wellington
New Zealand


Leigh Wanstead wrote:
> Hello everyone,
>
> I am using Project JEDI Code Library (JCL) JclDebug.pas to capture stack
> trace. It works great for main thread. But using Indy TCP/IP server
> environment onExecute event handler code, no stack can be captured. The
> reason for that is in different thread from the main thread. Does anyone
> know how to solve it?
>
> Here is the code template.
>
> var
>   varStringListStack: TStringList;
>     JclStartExceptionTracking;
>     try
>         try
>             // do something might throw thread ......
>         except
>             on E: Exception do
>             begin
>               varStringListStack := TStringList.Create;
>               try
>                 varStringListStack.BeginUpdate;
>
>                 JclLastExceptStackListToStrings(varStringListStack,
> False, True, True);
>                 varStringListStack.EndUpdate;
>               finally
>                 FreeAndNil(varStringListStack);
>               end;
>             end;
>         end;
>   finally
>     JclStopExceptionTracking;
>   end;
> TIA
>
> Regards
> Leigh
> www.smootharm.com <http://www.smootharm.com>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi





More information about the Delphi mailing list