Reputation: 291
I know how to debug in eclipse, but I want to know an effective way of finding the flow of execution from a method.
E g:
class A
{
method S()
{}
method S1()
{
B.SS()
}
method S2()
{
A.S1()
}
}
class B
{
method SS()
{
A.S()
}
method SS1()
{
B.SS2()
}
method SS2()
{
A.S2()
}
}
Given these two classes, how can I trace the flow of the methods from A.S2()
to A.S()
other than debugging?
Upvotes: 3
Views: 11432
Reputation: 114
When function A calls function B. Press CTRL, then use mouse to left-click on the called-function B, then the cursor would move to the definition of function B. By the same continuous way, you can get deeper and deeper, at last to the final function being called.
Upvotes: -1
Reputation: 393841
CTRL + ALT + H shows you the call hierarchy for a method. Perhaps that's what you wanted.
So it you highlight a method and click CTRL + ALT + H, it shows, in the Call Hierarchy window, all the methods the call that method, and for each of those methods, all the methods that call them, and so on ...
Upvotes: 9