debuggingvisual-studio-codestep-into

What is the difference between Step in, Step out and Step Over?


I'm doing a project in which I used Debugging using visual studio code. I need some clear differences between Step in, Step out and Step Over. I saw vs code debugging documentation but it has no such details related to these. Anyone have idea ?


Solution

  • Step in: means that if there is a function call, it goes inside the function and you can see how the function is executing line by line till it returns and you go back to the next line right after the function call.

    Step over: means that if there is a function call, it just executes it like a black box and returns the result, but you cannot see how the function was executed.

    Step out: means that if you have Stepped in a function and now you want to skip seeing how the rest of the function is going to execute, you Step out and the function returns. Then, you go back to the next line, that is the line right after the function call.