How to Step Over or Step Into in VS Code

Debugging is a crucial part of software development, and mastering navigation controls like “Step Over” and “Step Into” in Visual Studio Code (VS Code) can significantly speed up your troubleshooting process. This article provides a quick, direct guide on how to use these essential debugging commands in VS Code, detailing their keyboard shortcuts, UI buttons, and the key differences between them to help you control your code execution flow.

Step-by-Step Guide to Debugging Navigation

To use these controls, you must first start a debugging session and pause your code at a breakpoint.

  1. Set a Breakpoint: Click to the left of the line numbers in your code file. A red dot will appear.
  2. Start Debugging: Press F5 (or go to Run > Start Debugging).
  3. Navigate Code: Once the execution pauses on your breakpoint, use the Debug Toolbar at the top of the screen or keyboard shortcuts to navigate.

Step Over (F10)

Step Over allows you to execute the current line of code and immediately move to the next line in the same function or file.


Step Into (F11)

Step Into allows you to drill down into the details of your code by entering function calls.


Step Out (Shift + F11)

If you have stepped into a function and want to return to the parent function without stepping through every remaining line, use Step Out.