2

I have a Java application and basically I want to know all the methods that are called in the background when I do something in the GUI. I know you can view the Call Hierarchy by selecting a method but that's while the code isn't running. I want to view every single method called in every class when I select something for example so I can figure out which methods/classes/packages are responsible for this functionality. I also don't want to have to set a breakpoint at the start of every method as there are far too many methods/classes/packages for that to be feasible. Bear in mind that I don't even know the first method called for some of the operations, if I knew that, it'd be easy to figure out what's going on.

Is there a way to do this or am I ahead of my time?

Prince
  • 33
  • 1
  • 8
  • Not really, since plenty of methods can be called through reflection. The only way to answer this is at runtime, with a profiler. – Gimby Feb 15 '16 at 13:19
  • @Gimby ahh OK! Any Eclipse profiler plugin you recommend? – Prince Feb 15 '16 at 13:37
  • The built-in one works quite well. – Gimby Feb 15 '16 at 13:40
  • @Gimby I don't seem to have it on Eclipse Mars.. Do you know how I can install it? – Prince Feb 15 '16 at 13:59
  • Whoops, I'm mixing up IDEs. The Netbeans one works quite well. Java comes with JVisualVM, you can try that too. Other than that, google "java profilers". Or look here: http://stackoverflow.com/questions/2713940/eclipse-java-profiler – Gimby Feb 15 '16 at 14:08
  • Possible duplicate of [Eclipse - showing full call stack (like when it hits breakpoint in debugger) without putting in breakpoints?](https://stackoverflow.com/questions/6711954/eclipse-showing-full-call-stack-like-when-it-hits-breakpoint-in-debugger-wit) – Newton fan 01 May 24 '18 at 16:11

2 Answers2

0

I think you could use the debug mode to see all methods called

Joris
  • 31
  • 5
0

Run DEBUG in your IDE, your each step in application will move you to the right place in the code, during your program you can see each variable value.

Also you can follow each code line which your code is doing.

http://www.vogella.com/tutorials/EclipseDebugging/article.html

Regards!

amkz
  • 568
  • 3
  • 9
  • 31
  • 3
    Am I mistaking, or the vogella tutorial uses breakpoints on every debugging recipe? In the question, it was stated specifically that he wants to debug without the use of breakpoints. I am not trying to make criticism, it's just that I am in the exact same situation, and the vogella tutorial didn't help at all. – Newton fan 01 May 24 '18 at 15:52