Quantcast
Channel: BlackDog Foundry
Viewing all articles
Browse latest Browse all 27

Debugging your Xcode plugin

$
0
0

Today I discovered how to use Xcode to debug itself, and therefore also, my plugins!

In some of my other articles I talked about how to build and deploy your Xcode plugin by pressing ⌘-B, restarting Xcode, and watching /var/log/system.log. That works, but is very slow and tedious.

However, I discovered today that you can edit the Run phase of your plugin’s scheme to start a new copy of Xcode that has your plugin in it. To do this, edit your scheme:

Edit scheme

and in the Run phase, set the Executable to Xcode.app.

Setting Executable

Now, when you press ⌘-R (or click on the play icon for your plugin), a new copy of Xcode will be launched and will stop on breakpoints within your plugin.

Debugger

How exciting!

All articles in this series


Viewing all articles
Browse latest Browse all 27

Trending Articles