Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is step into, step out and step over in Firebug? [duplicate]

I am new to FireBug Debugger can anyone say what is step into,step over and step out

like image 318
akila Avatar asked Mar 22 '11 13:03

akila


People also ask

What is step into step over and step out?

step into -> go into the subroutine and wait for next action. step over -> jump over the subroutine without waiting again. step out -> if you are in the subroutine, you will leave it without waiting again.

What does step over step into and step out Mean while using the debugger?

Step Over: "When the next statement to execute reaches a method call, execute the method as a whole and stop" Step Out: "Finish off executing the callee's code and stop when execution returns to the caller" Continue: "Execute up until the next breakpoint"

What is the difference between step into and step over in Visual Studio?

Ans: Step Into: Step Into is used for debugging the test steps line by line. When the procedure gets called, Step Into enables you to get inside the procedure and debugs the procedure steps line by line. Step Over: Step Over will enable, only after the debugging is started with Step Into / Run From Step / Run to Step.

What is the step over command?

Step Over command:This command lets the application execute the next action. If the action involves a call to an operation, it does not step into its implementation (it steps over it instead).


1 Answers

  • Step into will cause the debugger to descend into any method calls on the current line. If there are multiple method calls, they'll be visited in order of execution; if there are no method calls, this is same as step over. This is broadly equivalent to following every individual line of execution as would be seen by the interpreter.
  • Step over proceeds to the next line in your current scope (i.e. it goes to the next line), without descending into any method calls on the way. This is generally used for following the logic through a particular method without worrying about the details of its collaborators, and can be useful for finding at what point in a method the expected conditions are violated.
  • Step out proceeds until the next "return" or equivalent - i.e. until control has returned to the preceding stack frame. This is generally used when you've seen all you need to at this point/method, and want to bubble up the stack a few layers to where the value is actually used.

Imagine the following code, which entered through main() and is now on the first line of bar:

function main() {    val s = foo();    bar(s); }  function foo() {    return "hi"; }  function bar(s) {    val t = s + foo(); // Debugger is currently here    return t; } 

Then:

  • Step into will proceed into the foo call, and the current line will then become the return "hi"; line within foo.
  • Step over will ignore the fact that another method is being invoked, and will proceed to the return t; line (which lets you quickly see what t is evaluated as).
  • Step out will finish the execution of the rest of the bar method, and control will return to the last line of the main method.
like image 88
Andrzej Doyle Avatar answered Oct 12 '22 18:10

Andrzej Doyle