Xcode custom behaviors

August 20, 2015

Xcode custom behaviors

A lot of you might have noticed, that when you are writing application in Xcode, you constantly perform some routine stuff: run product, open console, check for NSLogs or use some LLDB stuff, stop product, close console to have some more space for code. When you use breakpoints, then number of actions you have to perform each time to see exactly what you need at this very moment becomes cumbersome and tedious. And here is where Xcode custom behaviors can be very handy.

I won't go through each and every feature there, I will leave them to you to discover. However, I will show my own Xcode behaviors, which consists of only two of them, actually.


Xcode custom behaviors - Build

I use only one behavior during build time - the one that shows me how much warnings I have and where specifically. I don't remember if it is a default configuration, but I find it nice. During the product build I usually just stare and the progress bar. The process is pretty fast though, but as a little reminder about your custom #warning preprocessor marks.



Xcode custom behaviors - Running

In Pause action, that is when you hit a breakpoint or getting into the Debug View Hierarchy, which both, basically, pause your app, you get the most of the changes in the Xcode's UI.

First of all, a new tab is going to be created and calls Fix. I call it fix, as I usually stumble into this screen when I hit an exception breakpoint. Then a Debug navigator is going to be showed. It doesn't matter, whether you had it previously or not - it will be opened in any case.

Afterwards you will see a Debuger with Variables and Console View already opened for you. Also Utilities View will be hidden, because we will have not that much space alredy, and most of the time I don't need Utilities View during Pause.

Generates output

Xcode custom behaviors - Generate output

This is my most used part of the Xcode behaviors, and mostly any other developer. This option is also very helpful for me - it opens a new tab with name Console. A new tab with only one huge Console View for the whole tab and hides every other view.

So there you have it. You have just upgraded your Xcode with some neat features. Go ahead and experiment with couple others, see if you find them handy.


comments powered by Disqus