B4J Question How to identify the currently executing subroutine name?

m4.s

Member
Licensed User
Longtime User
I've found from other posts that the 'Me' object/keyword can be used to programmatically identify the currently executing class name (say, for logging and debug purposes).

But what can be used to identify the current *subroutine* name? And possibly its passed param name(s) and value(s) too? Again, for logging and debug purposes -- w/o having to manually pass such info to Log() or LogDebug().
 

Roycefer

Well-Known Member
Licensed User
Longtime User
The jAWTRobot library has a function called robot.B4JCallingThreadStackTraceGet that will give you the current stack trace. The first item in that stack trace is the currently executing sub.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…