How do we step through code?

 Posted by Tripati_tutu on 10/11/2010 | Category: .NET Framework Interview questions | Views: 2662 | Points: 40

Stepping through the code is a way of debugging the code in which one line is executed at a time.

There are three commands for stepping through code:

Step Into: This debugging mode is usually time-consuming. However, if one wants to go through the entire code then this can be used. When you step into at a point and a function call is made somewhere in the code, then step into mode would transfer the control to the first line of the code of the called function.

Step Over: The time consumed by the Step into mode can be avoided in the step over mode. In this, while you are debugging some function and you come across another function call inside it, then that particular function is executed and the control is returned to the calling function.

Step Out: You can Use Step Out when you are inside a function call and want to return to the calling function. Step Out resumes execution of your code until the function returns, and then breaks at the return point in the calling function.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response