From the course: Xcode 15 Essential Training

Unlock this course with a free trial

Join today to access over 23,100 courses taught by industry experts.

Using the debugger

Using the debugger

- [Instructor] One of the most helpful tools in any IDE is the debugger, which enables you to jump through code line by line as the code is running in order to resolve problems. In X code, you can use the debugger even in Swift UI. Consider my content view right here I have a text view that's getting its text from the response in a method called get text, which is defined right here. I'm going to put a break point right there on line 16 by single clicking to the left of the line number. And now I'm going to run the application and watch the debugger open up. After going to the simulator for a second when the app loads up, the focus comes back to X code and the application is paused on that method. The first thing I want you to notice here is that the code has stopped on this line. You'll see a very light green background behind this line. From there, you can go inside and step through the method that's being called get text line by line, by clicking the step into button, which is at…

Contents