
Now, a few things come to mind that could have gone wrong, but let's explore how the new Debug Console can help me narrow this down to find the root of this problem. I will now select the pencil to edit my account.įinally, I will try changing my display name.Īfter this, it seems to have worked, but if I exit the page and review my account, the change seems to get lost. Let's discover how, by taking advantage of good logging practices and a little help from the new Debug Console, I can quickly and easily identify the cause of this bug.įirst, I will attempt to recreate the issue by selecting Account in the tab bar. I have received reports that some users have noticed, after updating their profile, that the content does not seem to be saved. Now, let's use the new Debug Console to find and fix a real issue with my application. While doing so, an autocomplete popover will appear, providing me with assistance in creating the filter I am trying to enter.Īdditionally, the filter menu provides quick access to filters for specific types of logs, allowing me to choose the types I would like to view.Īnd lastly, when I secondary click a log that I am more or less interested in, the console provides options to hide and show similar logs to quickly focus on or exclude a particular set of logs from my view, like this.Īll of these filtering methods allow for me to quickly and efficiently cut through all of the output I have, allowing me to locate the logs most relevant to my current debugging needs. Of course, the filter can be entered directly in the filter bar, like this. The console also offers many different ways to create these filters. Now the console can perform complex, tokenized filtering to easily locate logs that are most relevant to my needs. It is easy for the console to fill up with logs I just don't care about, but with Xcode 15, filtering them out is easier than ever. While viewing this additional metadata is great, where the new Debug Console really shines is in its filtering capabilities. This even includes information like the call site where the name of the function that originally emitted the log is displayed. With this, a pop-up window appears providing me with all available metadata. If I don't want to see the metadata of all logs simultaneously, the console allows me to inspect the metadata of a single log by selecting the log in question and then quick-looking it by pressing space. This indicates that these logs are of higher importance and represent an error and fault respectively. I also may come across logs that have a yellow or red background. With this now enabled, the metadata is placed below each log in the console and is made smaller and more subtle as to not take away from the intended output. In this case I will select, Type, Library, Subsystem, and Category. Of course, I may still want to view the additional information associated with these logs, so we provide the ability to view this by selecting the metadata options button in the lower left of the Debug Console and choosing the types best suited for the current need. Instead, attention is focused on the underlying message the developer intended for me to view. Immediately, I notice the console is no longer prefixing each log with the metadata I am used to. This app allows users to manage backyards and care for virtual birds.Īfter launching the application, the Debug Console has been populated with many logs. On my device, I have launched the Backyard Birds app. Let's dig in and go over what's new in the Debug Console. And finally, I'll share tips on how you can take advantage of Apple's Unified Logging APIs to improve your diagnostic experience. Then, I'll introduce you to some improvements coming to LLDB. Next, I'll show just how useful the Debug Console can be by diagnosing a real bug in my own application. In this session, I'll quickly give you a tour of the Debug Console.

Today, I'm excited to introduce to you the brand-new Debug Console coming to Xcode 15. And I'm an engineer on the Xcode Debugger UI team.
