How to get caller information
uses ECallStack, EClasses, EDebugInfo; procedure TForm1.Button1Click(Sender: TObject); procedure Test; var Caller: Pointer; Info: TELLocationInfo; begin Caller := TEurekaStackList.Caller; Info := GetLocationInfo(Caller); Label1.Caption := Info.UnitName + '.' + Info.ClassName + '.' + Info.ProcedureName; // Will output: 'Unit1.TForm1.Button1Click' end; begin Test; end;
Comments