You can launch an application with the debugger attached to step through its entire code path.
To debug applications, your host machine must have an IP or serial connection to your target machine, so the IDE can communicate with the target-side components. Details on setting up these components are given in Host-target communications.
The IDE switches to the Debug perspective, which displays the source code being traced and other essential debugging information. If necessary, the IDE builds the application binary (with debugging information) and uploads it to the target. Then, it starts running the binary and GDB, which it attaches to the binary. If configured to do so in the Debug settings, the debugger stops on startup (by default, in the first line of main()).