Written by the author, AI-editedAI-generated, author-verified How this module was made
Hello again for this last demo in this lesson.
In this short demo, I’m going to show you something that I found quite interesting myself. This somehow goes against the intention of human as the driver, but think of it as a more powerful tool or a more powerful capability that an AI agent has on your project.
In this demo, I will instruct the AI agent to report or debug the application and give me some information from within the debug session while using breakpoints, and give me information found within the context of the breakpoint itself. When you debug an app, you include breakpoints, you figure out values of the variables inside when the application pauses. An AI agent can do that on your behalf with Xcode 27. Let’s have a look.
Before I write the prompt, I included a new file, AI-BREAKPOINT-GUIDE.md, as instructions for the AI model about the creation of breakpoints directly from the AI session. You can consider this as a new skill. For now, I’ll directly reference this file in the AI prompt.
I want you to debug the app and use breakpoints while running the app and report the UsageInsights directly from the debugger by capturing it from the init of UsageInsightsView. I’ll navigate to the screen myself once you confirm the breakpoint is ready. Use AI breakpoint guide markdown for instructions on the breakpoint setup. Capture the data and show the information captured after each breakpoint. This is only a demo for the debugging controls Agentic AI has with Xcode 27. No bugs and no fixes needed. Only print the data caught from the debugging session into the conversation.
I want you to debug the app and use breakpoints while running the app and report the usage insights directly from the debugger by capturing it from the init of UsageInsightsView. I'll navigate to the screen myself once u confirm the breakpoint is ready.
use "AI-BREAKPOINT-GUIDE.md" for instructions for the breakpoint setup.
Capture the data and show the information captured after each breakpoint.
This is only a demo for the debugging controls agentic AI has with Xcode 27. No bugs and no fixes needed, only printing the data caught from the debugging session into the conversation.
The agent set up everything, sorted out the breakpoint, and now it launched the app, and now it’s waiting for me to open or navigate to the screen as I actually mentioned in the original prompt. There we go. A breakpoint happened. Let me confirm in the conversation.
The agent finished and retrieved the data. This was all caught from the debugging session. It took quite a while. As you can see, the data here matches what’s on the simulator. This took a lot longer than if you would’ve done it yourself.
Xcode is not providing something unique to Agentic AI to be able to introduce breakpoints, read the values from them. It’s all running through the command line and debugger commands while the app is in a debug session with Xcode, and it’s also able to read the data printed in the console log. This basically uses different features or different capabilities and puts them together to give you a unique experience.
This took a lot longer than it should have. Probably, if you did it yourself, would’ve taken you 10 seconds, if not less. The purpose of this demo is only to show you something that you can have as a unique setup, a potential of a new powerful tool and how you use it yourself, how you drive it is where you come in and what makes it unique. If you let go to an AI agent completely, in this specific scenario, it would take hours and hours for something that is rather trivial. But with the right balance, it might save you days debugging something.
I hope you enjoyed this module and this unique lesson, and I wish you all the best with the next modules in this program. Have a great day.