As one of the goodies launched during current WWDC 2013, Apple has released a developer preview of Xcode 5 and detailed some of the new features it offers such as Automatic Configuration, Test Navigator, Bots, Auto Layout, Asset Management, Debug Gauges, Source Control, and more.
Looking over some of the videos of the WWDC Sessions Videos, this seem to be the first XCode version that is completely built around ARC, as core memory management technology, and proudly announced as the “best ever”, stable, fast and sleek.
I had a chance to play with it and these are the first impressions.
Interface
We have a lot of things to cover today, but first let’s go over the changes in interface.
The first impression I had is that the available space for code is much bigger. This is mostly an illusion due to the diminished height of the top instrument bar and usage of lighter colors for project navigator toolbar and the navigator toolbar:
On debugging side, first thing you’ll notice is that breakpoint activation button has been moved from tool bar down to the debugger toolbar. Apple rationale is that this is much natural, because the breakpoint activation button is right to the other buttons that you use for debugging (run, pause, step into, step over etc). FYI, the breakpoint activation shortcut is the same (Cmd + Y).
Enabling/ disabling individual breakpoints was kept in the breakpoints navigator. Breakpoint icons have a bigger size (better).
Creating special breakpoints (until now, symbolic and exception) has been supplemented with additional creation of breakpoints for OpenGL ES errors and unit test error breakpoint. These two behave like exception breakpoints, but are triggered by related issues.
What I find interesting here is this additional OpenGL ES error breakpoint that clearly indicate Apple’s orientation towards additional support for game development.
Debug Navigator
First thing that you will notice here is the brand new Debug Gauges panel. You might choose here to display your stack based on threads (and jump to individual files that you want to explore for debugging) or on GCD mode, when you want your threads to be organized by queues.
Debug Gauges panel tightly integrates Instruments optimization support directly into XCode. There are multiple debug gauges that can show you the performance and characteristics. Two of them are universal, the CPU and the memory. Since those are universal we’ll gonna take at look at them more closely today.
XCode Debugging Reports (Improved Data Inspection)
If you click on the CPU Gauge, it brings you a CPU report. Some
Second indicator is the CPU for the whole system. Utilization over time. Discussion with separate threads. The best place to do this is in Instruments (profile Instruments).
Data Tips and Quick Look
Well this is new. And cool. Up to XCode 4.6, stack variable (data) introspection could be done only in the variables’ view of the debugging panel. In XCode 5.0 you can do this (and more) directly in the code.
If you’ve been programming for a while, you know that you hit run, you do some debugging, then program again etc. You have your code editor, and when you hit a breakpoint, the debug area comes up, showing useful information.
A lot of times, we get all context we need from code and it would be great to see the whole method that you are on it. Hide the debug area, use it when you need it, have more space for coding and move your debugging experience inside the code. This looks like this: hover an object and get a popover with data tips. Notice (in image below) the two icons, the eye and the info button:
All extraneous information is stripped, you have a quick glance to object info in these tips. Clicking the info button, provide the results as if you’d typed in lldb console “po calculator
“:
Another neat implementation of this feature, is a visual representation of sizes. Look below:
That’s it for today. I got tired of writing so much. More to come (I hope). 🙂
Leave a Reply