Xcode Treasures by Chris Adamson
Author:Chris Adamson
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
Publisher: Pragmatic Bookshelf
Breakpoint Actions
The bottom two items in the breakpoint editor pop-over are the Action and Options sections. There’s only one option: automatically continuing after hitting the breakpoint. That seems pointless, right? Why hit a breakpoint only to then continue?
The reason to continue is that the “Add Action” button lets you add actions, and it’s often enough to perform that action and continue, without stopping to investigate anything.
The simplest thing you can add is a logging action. Once you click, “Add Action”, the UI expands to offer a pop-up menu of action types, and various buttons and text fields to customize the action. The simplest to understand is the Log Message action. It can log a string to the console or send it to the Mac’s speech synthesizer to be spoken aloud. It also allows you to use @expression@ syntax to evaluate expressions in the currently active language and insert them into the log string.
The following figure shows a breakpoint on the isPrime = false line, logging a reason for ruling out candidate as a prime number, with the log string @candidate@ is not prime (divisible by @divisor@):
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12708)
Hello! Python by Anthony Briggs(10010)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9879)
The Mikado Method by Ola Ellnestam Daniel Brolund(9877)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(9842)
Dependency Injection in .NET by Mark Seemann(9422)
Hit Refresh by Satya Nadella(8875)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8391)
The Kubernetes Operator Framework Book by Michael Dame(8019)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7843)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7809)
Exploring Deepfakes by Bryan Lyon and Matt Tora(7805)
Grails in Action by Glen Smith Peter Ledbrook(7776)
Practical Computer Architecture with Python and ARM by Alan Clements(7757)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7723)
Robo-Advisor with Python by Aki Ranin(7704)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7657)
Building Low Latency Applications with C++ by Sourav Ghosh(7608)
Svelte with Test-Driven Development by Daniel Irvine(7592)
