How do I step into and step over the code with debugger? What do ‘stepping into’and stepping over’ actually mean?
The Step Into option (accessible through Debug -> Step Into or key F11) takes the execution control inside the calling method. For example, if the execution is paused at a line having code
int p = obj.GetInteger();
Then pressing F11, will take us to the body of the GetInteger() method and the execution control will pause at its first line.
The Step Over option (accessible through DebugàStep Over or key F10) executes the code in the line at which the debugger is paused and takes the execution control to the next line. For example, if the execution is paused at a line marked line 1 in the code below:
int p = obj.GetInteger(); // line 1
Console.WriteLine(p); // line 2
Then pressing F10, will execute the code at ‘line 1’ and will take the execution control to the line marked ‘line 2’ in the above code and the execution control will pause at the line // 2.
Index