Solution 1 :
What about the android profiler? you can catch a profile of certain action and than see all the function call stacks, memory consumption etc.
https://developer.android.com/studio/profile/android-profiler
Problem :
I am a beginner android developer and trying to fix some bugs in the app.
I was using Android Studio Debugger to manually put breakpoints and see how the execution was going. This process was working fine for me until now, when I am in a situation, where I am not able to figure out why certain view is opening up when I do a certain action (I do not know where exactly to put breakpoints).
This led me to wonder if there was an automatic way of knowing what is going on behind the scenes when a user performs a certain action in an app. LogCat is one way, but it does not show all function calls. Only some of them.
I wish to know if there is a way to know, for example, if a user taps on a button, so and so functions are called in such and such sequence.
Comments
Comment posted by smmehrab
I generally use LogCat or Toast Message.
Comment posted by Nicolas
If you don’t know where to put your breakpoint, I don’t know how logcat would help… But how would you not know? Is it in your own code?
Comment posted by k786
@Nicolas , it is not my code, I just joined on a new job as an android developer. This is the project that I am working on.
Comment posted by KalanaChinthaka
Put some print statements or toasts in the each method and check them if they are printed in the logcat.
Comment posted by cantona_7
@k786 you can use listeners for buttons. try to post the code by changing the variables, so that atleast we get the gist of the problem.