Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

The Edit/Build/Debug Cycle

Once a product has been designed, you spend time in the edit/build/debug cycle: adding or modifying code, building the product, testing it, and repeating these steps, as you find and correct bugs or add additional features. You’ve seen Xcode’s editing features in “Editing Files.” The following sections describe tools, features, and performance enhancements Xcode provides so that you can take control of the coding cycle.

In this section:

Tools
Building
Debugging
Optimizing the Edit/Build/Debug Cycle


Tools

The Xcode Tools include the Xcode application, Interface Builder, and a set of integrated compilers, debuggers, and build tools. Along with many tools created by Apple, Xcode incorporates several tools from the UNIX open source community. Together, these tools build on years of software development experience and take advantage of the UNIX-compatible underpinnings of Mac OS X.

Among the open source tools available in the Xcode IDE are the GCC compiler (which supports development in C, C++, Objective-C and Objective-C++), the GDB source code debugger, and the javac and Jikes Java compilers. Apple contributes to improvements in many of these open source tools. Standard UNIX tools are available in subdirectories of /usr.

Tools that originate with Apple include:

In addition, Xcode includes tools to help you locate hard-to-find bugs, such as memory leaks and bugs in threaded code, as well as tools to help you analyze and optimize the performance of your software.

For more information, see the documents in Tools Xcode Documentation and Performance Documentation.

Building

The Xcode build system provides flexibility and customizability to your workflow. You can control the build process from the toolbar or with keyboard shortcuts, can view errors in the project window or in a separate Build Results window, and can go quickly from errors to the offending line of source code. In the Build Results window, you can control the level of detail—for example, you can choose whether to show warning messages and whether to display build steps.

What takes place at build time depends on several factors. When you create a new project in Xcode, it contains a great deal of build information, including default build settings, build rules that specify tools for processing source files, build styles for development and deployment builds, and build phases for performing the steps of the actual build. To learn more about the information that goes into building a product, see “The Build System.”

For a simple project, default values are sufficient for Xcode to build your product, performing such steps as compiling, linking, and copying files to the appropriate locations in an application bundle. For projects with special requirements, Xcode provides numerous options for controlling the process. For example, you can set per-file compiler flags or add a step to the build process that executes a shell script to perform special processing.

Debugging

The open source GNU Debugger, GDB, sits behind Xcode’s debugger user interface. It also makes available powerful command-line debugging features. As a result, you can debug at whatever level is most comfortable for you. You can work in the user interface for most of your debugging tasks, but drop down to the command line to take advantage of advanced features that are less commonly needed. For debugging Java products, Xcode communicates directly with the Java Virtual Machine. To learn more about Xcode’s debugger, see “Running in Xcode’s Debugger.”

Optimizing the Edit/Build/Debug Cycle

Beside the standard features you expect in an IDE, Xcode sports a number of innovative features that can speed up your edit/build/debug cycle and make a big contribution to an efficient workflow:

To learn more about these features, see “Optimizing the Edit-Build-Debug Cycle,” “Using ZeroLink,” and “Using Fix and Continue.”



< Previous PageNext Page > Hide TOC


Last updated: 2006-11-07




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice