Java Reference
In-Depth Information
Figure 4-13
Firebug adds the function to the top of the call stack for every function call. You can already
see that the fi rst function called was actually the code attached to the onclick event handler
of your button. Next, added to the call stack is the function called by the onclick event
handler, which is the function button1_onclick() shown at the top of the call stack.
5.
If you want to see where each function was fi rst entered, just click the function name in the call
stack window. Click onclick and the calling code (that is, the code connected to the onclick
attribute of the <input/> element) will be shown. Now click the top line, button1_onclick,
and that will take you back to the current execution point.
6.
Now Step Into twice. The fi rst step is to the line that calls the firstCall() function. The sec-
ond step takes you into that function itself. The function is immediately added to the call stack,
as shown in Figure 4-14.
7.
Step Into again to enter the second function, secondCall(). Again this is added to the call
stack. One more step takes you into the third function, thirdCall(), again with its name
being added to the top of the call stack.
Search WWH ::




Custom Search