05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Errors and Warnings<br />

Traditional programming separates writing code from building programs. Although Xcode has<br />

always done both, it continued to require leaving the editor to see the results of a build, and then<br />

switching back and forth between modes to handle any errors or warnings from the build system.<br />

Xcode 3 finally merges these two modes with inline error and warning pop-up bubbles, as<br />

shown in Figure 25-17.<br />

Figure 25-17. Xcode’s new inline error and warning bubbles<br />

You can hide or reveal the bubbles by clicking their icons in the gutter. Warning and error<br />

bubbles can also be toggled en masse via the View menu. You can also use the keyboard shortcut<br />

Cmd+= to move forward through the bubbles and Cmd++ (that’s Cmd plus the + key) to move<br />

backward.<br />

I cannot overstate what a tremendous improvement this is. The time saved by not having to<br />

switch contexts is enormous, especially for multifile edits.<br />

NOTE Using = to move forward and + to move backward seems counterintuitive. Shouldn’t +<br />

move forward and - move backward? However, given the standard keyboard layout, + is actually<br />

Shift+=, so these shortcuts make good sense in practice, even if they seem weird in<br />

writing.<br />

Debugging<br />

CHAPTER 25 MAC <strong>OS</strong> X DEVELOPMENT: THE TOOLS 469<br />

No matter how good a programmer you are, you’re going to have bugs. Whether it’s a fullfledged<br />

crasher or just an unexpected result, getting to the bottom of things gets exponentially<br />

harder as a program grows in size and complexity. When reading the code and logging aren’t<br />

enough, it’s time to pull out the big guns. Xcode not only includes the GNU debugger, GDB,<br />

but integrates it into the interface in a way that’s much easier than traditional command-line<br />

debugging.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!