Android / Java: Get the name of method being executed

If you want to trace the name of the method that’s being executed, the Java code snippet in this page might help you.

This is especially handy when you are debugging by tracking every method that is executed. You can enclose these lines of codes in a function that you call in every method — that’s easier than typing the name for each method you’re tracking, right? 🙂

The String variable methodName will contain the name of the method where you place the following lines of code:

Related Posts:

Posts that may be related to "Android / Java: Get the name of method being executed":

Catzie

An odd human being who happens to have a variety of ever-changing interests, but right now they are programming, making up silly song/rap lyrics, K-pop, drawing, creating unique dessert/drink flavors, obsessing about finding out how some things works, automation, anime, video games... Ran online dessert shops Cookies PH and Catzie's Cakery in her past life.

Leave a Reply

Your email address will not be published. Required fields are marked *