I don't understand. Why can I not Start profiling when entering a function and Stop profiling when exiting the same function? I would think that this would be a very common thing to do. For that matter, why is there a limit of only one anyway? I can think of other use cases, such as where I'd want to stop and generate a report at the exiting of a function. What's up with this? Why the limitation?
I might do not understand your use case / scenario with full details, but aren't Triggers the feature you are looking for (https://support.smartbear.com/aqtime/docs/profiling-with/set-up-project/what-to-profile/triggers/abo...) ?
Yes, that is what I was attempting to do and I got the error message stating that I have duplicate routines.
I've attached an image of an example. The function I used is just one that I selected at random.
> error message stating that I have duplicate routines.
I think this is expected.
According to my understanding of the https://support.smartbear.com/aqtime/docs/profiling-with/set-up-project/what-to-profile/triggers/abo... help topic (How Triggers Work paragraph):
"When an on-trigger routine begins executing, it saves the current profiling status for its thread and enables profiling for that thread. This still applies to everything it calls. When it reaches the end of its execution (after perhaps hundreds of calls, sub-calls and sub-sub-calls), it restores the thread’s profiling status as it found it."
So, I think that you should disable all profiling (like it is on the screenshot you've provided), then create the On-trigger and add the target routine to it and start profiling run.
Profiling should start on function enter and stop on exit.
Summarizing: Delete Off-trigger and do profiling run. I hope you should get desired result.
Interesting. So, what would I need to do if I wanted the profiling to occur when entering one function but exiting at some other function?
It might depend on your exact scenario, but I would think about Actions (https://support.smartbear.com/aqtime/docs/profiling-with/set-up-project/what-to-profile/actions/abou...) - one that enables profiling on enter and another one that disables profiling on exit.