Is there any way to know the name of a method I'm currently in?
So that:
procedure TMyObject.SomeMethod(); begin Writeln('my name is: ' + <hocus pocus>); end;
would produce this output:
my name is: SomeMethod
JCL is free and has functions for that. It does depend on how well a stack trace can be made and how much debug information is present.
JclDebug.pas
function FileByLevel(const Level: Integer = 0): string; function ModuleByLevel(const Level: Integer = 0): string; function ProcByLevel(const Level: Integer = 0): string; function LineByLevel(const Level: Integer = 0): Integer;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With