...

/

Navigating with the Debugger Toolbar and Debugging Windows

Navigating with the Debugger Toolbar and Debugging Windows

Learn about debugger toolbars, set breakpoints, and use buttons for debugging tasks and stepping through code while identifying and fixing bugs in code.

The Visual Studio and Visual Studio Code IDEs provide debugger toolbars that give quick access to controls that allow stepping through code, inspecting variables, and fixing bugs. Debugging windows show valuable information like variable values, call stacks, and breakpoints. The toolbars make debugging easier by allowing us to control execution flow and visibility into the program state as we walk through the code.

Navigating with the debugger toolbar

Visual Studio Code shows a floating toolbar with buttons to make it easy to access debugging features. Visual Studio 2022 has:

  • Two debug-related buttons in its Standard toolbar to start or continue debugging.
  • Hot reload changes to the running code.
  • A separate “Debug” toolbar for the rest of the tools.

Both are shown and described in the following figure and list, respectively:

Press + to interact
Debugging toolbars in Visual Studio 2022 and Visual Studio Code
Debugging toolbars in Visual Studio 2022 and Visual Studio Code
  • Start/Continue/F5: This button is context-sensitive. It will either start a project running or continue running it from its current position until it ends or hits a breakpoint.

  • Hot Reload: This button will reload compiled code changes without restarting the app.

  • Break All: This button will break into a running app's next available line of code.

  • Stop Debugging/Stop/Shift + F5 (red square): This button will stop the debugging session.

  • Restart/Ctrl or Cmd + Shift + F5 (circular arrow): This button will stop and immediately restart the program with the debugger attached again.

  • Show Next Statement: ...