RandomClear icon

How to get call stack on demand

RandomClear | PRO | 01/30/13 07:27:45 AM UTC | 0 ⭐ | 829 👁️ | Never ⏰ | []
Delphi |

760 B

|

None

|

0 👍

/

0 👎

// See also: http://pastebin.com/46QkwZNi - "how to convert call stack to text"
// See also: http://pastebin.com/36yMX1Mf - "how to get call stack for last exception"
// See also: http://pastebin.com/ACtr0r6S - "how to silently log exception"
// See also: http://pastebin.com/sBn3PA1r - "how to create hang/deadlock report on demand"
 
uses
  ECallStack,
  EClasses,
  EDebugInfo;
 
procedure TForm1.Button1Click(Sender: TObject);
var
  CallStack: TEurekaBaseStackList;
begin
  CallStack := GetCurrentCallStack;
  // You can also use other functions from ECallStack unit
  try
    Memo1.Lines.Text := CallStack.ToString;
    // You can also use CallStackToString(s) routines to customize textual formatting
  finally
    FreeAndNil(CallStack);
  end;
end;

Comments