AppCode 2021.2 Help

Step through the program

Stepping is the process of controlling step-by-step execution of the program.

AppCode provides a set of stepping actions, which are used depending on your strategy (for example, whether you need to go directly to the next line or enter the methods invoked on your way there).

The stepping buttons are located on the Debug window toolbar.

Stepping buttons in the Debug tool window

Step over

Steps over the current line of code and takes you to the next line even if the highlighted line has method calls in it. The implementation of the methods is skipped, and you move straight to the next line of the caller method.

  • Click the Step over button Step Over button or press F8.

If there are breakpoints inside the skipped methods, the debugger will stop at them. To skip any breakpoints on the way, use Force step over.

Step into

Steps into the method to show what happens inside it. Use this option when you are not sure the method is returning a correct result.

  • Click the Step into button Step Into button or press F7.

Stepping in a method

Some methods are skipped by Step into as you normally don't need to debug them. This list can be fine-tuned on the Build, Execution, Deployment | Debugger | Stepping page of the Preferences dialog ⌃ ⌥ S.

Step out

Steps out of the current method and takes you to the caller method.

  • Click the Step out button Step Out button or press ⇧ F8.

Run to cursor

Continues the execution until the position of the caret is reached.

  1. Place the caret at the line where you want the program to pause.

  2. Click the Run to cursor button Run to Cursor button or press ⌥ F9.

Also, you can Run to Cursor by clicking the line number in the gutter.

You can configure whether you want Run to Cursor to work on clicking a line number in Preferences | Build, Execution, Deployment | Debugger.

To skip any breakpoints on the way, use Force run to cursor.

Force step into

Steps in the method even if this method is skipped by the regular Step Into.

  • Click the Force step into button Force Step Into icon or press ⌥ ⇧ F7.

In case the source code of the method or function that you want to step into is unavailable, you can debug disassembled code in a dedicated view.

Force run to cursor

Continues the execution until the position of the caret is reached. All breakpoints on the way are ignored.

  1. Place the caret at the line where you want the program to pause.

  2. From the main menu, select Run | Debugging Actions | Force Run to Cursor or press ⌃ ⌥ F9.

Force step over

Steps over the current line of code and takes you to the next line even if the highlighted line has method calls in it. If there are breakpoints in the called methods, they are ignored.

  • From the main menu, select Run | Force Step Over or press ⌥ ⇧ F8.

Last modified: 23 September 2021