GST Billing Software

Step into code, line by line Step through code, skipping functions

header image

Debugging of Code

Erachana Line

Start debugging

F5 (Debug / Start Debugging) This command starts your app with the debugger attached.

The green arrow also starts the debugger (same as F5).

DBG_Basics_Start_Debugging

A few other ways that you can start the app with the debugger attached include F11 (step into code), F10 (step over code), or by using Run to Cursor.

When you debug, the yellow line shows you the code that will execute next.

DBG_Basics_Start_Debugging

While debugging, you can switch between commands like F5, F11 and use other features (like breakpoints) to quickly get to the code you want to look at.

To stop on each line of code (each statement) while debugging, use theF11 keyboard shortcut (or Debug / Step Into on the menu).

As you execute each line of code, you can hover over variables to see their values, or use the Locals and Watch windows to watch their values change.

Here are some details about the behaviour of Step Into:

  • On a nested function call, Step Into steps into the most deeply nested function. If you use Step Into on a call like Func1(Func2()), the debugger steps into the function Func2.
  • The debugger actually steps through code statements rather than physical lines.

When running code in the debugger, often you will realize that you don't need to see what happens in a particular function (you don't care about it or you know it works, like well-tested library code). Use these commands to skip through code (the functions still execute, of course, but the debugger skips over them).

Keyboard Command

Menu Command

Description

F10

Step Over

If the current line contains a function call, Step Over runs the code then suspends execution at the first line of code after the called function returns.

Shift+F11

Step Out

Step Out continues running code and suspends execution when the current function returns (the debugger skips through the current function).