RandomClear icon

How to get source code location information

RandomClear | PRO | 01/30/13 07:16:41 AM UTC | 0 ⭐ | 889 👁️ | Never ⏰ | []
Delphi |

280 B

|

None

|

0 👍

/

0 👎

uses
  EClasses,
  EDebugInfo;
 
procedure Test;
begin
 
end;
 
procedure TForm1.Button1Click(Sender: TObject);
var
  Info: TELLocationInfo;
begin
  Info := GetLocationInfo(@Test);
  Label1.Caption := Info.UnitName + '.' + Info.ProcedureName; 
  // Will output 'Unit1.Test'
end;

Comments