Breakpoints can be added in your code, but in Cocoa, you get the additional option to create breakpoints automatically if a certain condition is met. See how to create breakpoints for exceptions in this video.
- [Instructor] Let's say there's an exception…at some point in your code.…Right here I'm creating an NSException object…and I'm calling this method raise.…So I'm raising an exception…in applicationDidFinishLaunching.…Maybe in your code, you want to handle a built-in exception…or one of your own and you want to have a breakpoint…when that exception occurs.…So, if I run the application, let's look…at this example here where I'm just calling…that exception out when application finishes launching.…
Here I see a message in the output window.…But my application is running just fine.…So it's silently having issues in the background.…What if you wanted a break point to be triggered…whenever there's an exception?…Well, you can do that through the Breakpoint navigator.…In the navigator, click on the Breakpoint navigator…which is the second button from the right.…From here click the + button at the bottom left corner…in the navigator and choose Exception Breakpoint.…This is going to automatically create a breakpoint…whenever an exception occurs in your code.…
- Installing your development tools
- Working with Xcode and the MVC pattern
- Creating basic interactions
- Creating delegate classes
- Building a user interface
- Laying out the UI
- Working with data and table views
- Binding data objects to the UI
- Debugging your app
- Distributing the app
Skill Level Beginner
1. Get Started
2. Core Cocoa Skills
4. Create User Interfaces
5. Arrange User Interfaces
6. Use Data Controls
7. Debug and Troubleshoot
8. Distribute an Application
9. Finishing Touches
Create full screen apps1m 51s
Next steps1m 21s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.