Skip to content
KnowledgeCity

Swift: Debugging and Testing

Learn how to debug and test programs in Swift
Preview the first lesson free — get full access to all 4 lessons.
Course: On-Demand
Advanced Provider Mark Nair  4 Lessons ·  24m  in English 

Course Description

Debugging is one of the most overlooked but valuable skills in software development. Proper debugging will get you to your end application faster and with fewer headaches along the way. These skills are essential for Swift developers and will help you deliver more usable apps and programs. The topics discussed in this course will build on your knowledge of the Swift programming language and explain some of the tools offered by Xcode to test and debug your code.

In Swift: Debugging and Testing, you will learn how to test and debug your code in Swift. We will discuss assertions in Swift, which are a way of asserting a statement's truth and testing that assertion. We will also explain how to use breakpoints in your code, which pause Xcode to let you inspect the state of your program and address any possible bugs. We will also look at debugging with capture view hierarchy and view debugging to understand how to find errors in the user interface.

What You'll Learn

  • Describe debugging in the Swift programming language
  • Use assertions to test the truth of a statement in Swift
  • Apply breakpoints to pause Xcode and inspect program state
  • Debug a view using capture view hierarchy and view debugging
  • Identify different unit tests in Swift

Key Takeaways

  • Debugging is an overlooked but valuable skill that helps Swift developers reach their end application faster and with fewer headaches.
  • The course builds on existing Swift knowledge and covers Xcode tools for testing and debugging code.
  • Assertions in Swift are a way of asserting a statement's truth and testing that assertion.
  • Breakpoints pause Xcode so you can inspect the state of your program and address possible bugs.
  • Capture view hierarchy and view debugging help find errors in the user interface.

Frequently Asked Questions

Who is this course for?

It is for Swift developers who want to build on their knowledge of the Swift programming language and learn to test and debug their code, since these skills are essential for delivering more usable apps and programs.

What tools does this course cover?

It explains tools offered by Xcode to test and debug code, including assertions, breakpoints, capture view hierarchy, and view debugging.

What will I learn to do with breakpoints?

You will learn how to use breakpoints in your code to pause Xcode and inspect the state of your program so you can address any possible bugs.

What topics are taught in the lessons?

The lessons cover Debugging With Assert and Breakpoints, Debugging with Capture View Hierarchy, View Debugging, and Unit Testing.

What skills does this course build?

It builds skills in code testing, debugging, software testing, symbolic debugging, UI testing, and unit testing.