Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the caller method when debugging using Eclipse

When debugging Java code in Eclipse, is there any way to find which method called the current method?

like image 377
Apache Avatar asked Oct 26 '25 03:10

Apache


1 Answers

Once you've started the debugger, you can go to the (Window > Show View > Debug) debugging view. Set a break point in your code. When the break point is hit, it will bring up a call stack. When you click on the different items in the call stack, you should be able to see the code path used to call the method.

Also, when your program isn't running, if you highlight the method name, and then do a right click > references > Workspace (or Ctrl + shift + G), it will bring up a search view with all of the places in your workspace that the method is called.

like image 60
Dave Avatar answered Oct 28 '25 18:10

Dave



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!