Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering macOS Programming

You're reading from   Mastering macOS Programming Hands-on guide to macOS Sierra Application Development

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781786461698
Length 626 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Stuart Grimshaw Stuart Grimshaw
Author Profile Icon Stuart Grimshaw
Stuart Grimshaw
Gregory Casamento Gregory Casamento
Author Profile Icon Gregory Casamento
Gregory Casamento
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Hello macOS 2. Basic Swift FREE CHAPTER 3. Checking Out the Power of Xcode 4. MVC and Other Design Patterns 5. Advanced Swift 6. Cocoa Frameworks - The Backbone of Your Apps 7. Creating Views Programmatically 8. Strings and Text 9. Getting More from Interface Builder 10. Drawing on the Strength of Core Graphics 11. Core Animation 12. Handling Errors Gracefully 13. Persistent Storage 14. The Benefits of Core Data 15. Connect to the World - Networking 16. Concurrency and Asynchronous Programming 17. Understanding Xcodes Debugging Tools 18. LLDB and the Command Line 19. Deploying Third - Party Code 20. Wrapping It Up

Getting the most out of breakpoints


It's very likely you're using breakpoints already; any debugging you have done will have been very difficult without them. To add a breakpoint to your code, you can do one of the following:

  • Click the romantically named gutter to the left of the code editor
  • Create a breakpoint at the line the cursor is on with the shortcut command + \
  • The same command + \ will also delete an existing breakpoint

And while on the subject, you can disable (though not delete) all breakpoints with the shortcut command + Y. If you're new to Xcode, that may be new to you. So now you know.

A breakpoint does exactly what you expect it to do: it halts the code immediately at the line it is located at. But it doesn't stop there (well, I suppose it does... no pun intended).

Editing breakpoint options

Right-click on the breakpoint to edit it:

We'll get to Edit Breakpoint... in a moment, but for now, note that you can disable and delete the breakpoint from here, or you can show it in the Breakpoint...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image