Xcode and Swift come with a powerful memory debugging infrastructure, letting you inspect the contents of existing and destroyed objects, inspect the contents and relationships between your objects, and more. In this section, we'll get you started with these powerful tools, so that later on, you'll be able to debug complicated pieces of code with ease.
Memory debugging
Configuring your project
In order to see the memory allocation backtraces, we need to enable Malloc Stack in our Scheme. You can do so by following these steps:
- Open your Scheme settings with ⌘ | <, or by navigating to Product | Scheme | Edit Scheme...
- Navigate to the Diagnostics tab
- Ensure that you select the options shown in the...