Displaying what function is running

I have a sketch with about 50 functions that run one after the other, sequentially, in a loop, for a light display. I would like to show what function is running at any one time on the serial monitor.

I could put serial print commands in each function, but that seems tedious and overkill, and inefficient. Is there a quicker/more efficient way to do this? Is there a "print executing function" command?

Can I create a function to do this?

Is there a “print executing function” command?

No. Even if there were, where would you call it from?

Can I create a function to do this?

You can do whatever you like. Keep in mind that, at run time, functions don’t have names.

When I create a new function, I type the type, the function name, the arguments with types, an opening {, two print statements to show the function being entered and the function be exited, any return statement needed, and the close curly brace.

Then, I go back and make the function actually do something. It’s an easy habit to get into.

queenidog:
I could put serial print commands in each function, but that seems tedious and overkill, and inefficient. Is there a quicker/more efficient way to do this? Is there a "print executing function" command?

GCC has -finstrument-functions feature that would help one to write such an automatic/implicit tracer (see here), but getting to that feature in Arduino IDE environment would be difficult.

Aside from that, you can write a function that would print whatever you want yourself. Buy you will still have to call it explicitly from your functions.