, 14 tweets, 7 min read Read on Twitter
1/n Summary of my talk "Debugging in Xcode" at Swift Mumbai Chapter 8 @swiftindiagroup is as follow
2/n We can spend less time debugging if we set up our workflow to avoid debugging.
3/n Static Analyser: It analyzes possible paths in code and reports potential & impossible to replicate bugs. Identified issues are shown in build-time tab of issue navigator.
4/n Run-Time tools: They detect issues in the at the run time. To enable run time tools, open "Diagnostic" tab on Edit Scheme window. Identified issues are reported in the Runtime Tab of Issues Navigator.
5/n: Main Thread Sanitizer detects invalid usage of AppKit, UIKit, and other APIs on a background thread.
6/n: Thread Sanitizer finds threading issues such as usage of uninitialized mutex and Data Races ( Multiple threads accessing the same variable without synchronization and at least one access is a write operation. )
7/n: Address Sanitizer or ASan detect memory corruptions and other memory errors at runtime. Refer developer.apple.com/documentation/… for more details
8/n: Undefined Behaviour Sanitizer is an LLVM tool for C languages that detect undefined behaviors.
9/n Use Asserts, preconditions and fatal error as runtime checks to avoid app going in invalid state with corrosponding custom error messages. App crashing is better than having difficult to replicate logical state.
10/n: Use Enums to write robust logic. If you miss to handle any case inside switch case, compile time error will bring it to your notice.
11/n Use enum + protocol to write robust but light weight network layer.
12/n Use enums to avoid typos while string constants
13/n Recap #xcode #ios #debugging
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to hrishidev 
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!