Debugging in XCode without project?

Posts: 45
Joined: 2006.07
Post: #1
Hey everyone -

So I have a nice cross-platform build system, and it builds my software with CMake. Yay.

The problem is, if I want to debug my software, I typically use gdb from the command line. Boo.

I hear XCode has sweet debugging capabilities (as a gdb frontend). Is there a straightforward way to use XCode to debug a program that wasn't built as part of an XCode project?
Quote this message in a reply
Posts: 749
Joined: 2003.01
Post: #2
If you want to debug from xcode, you'll need to build from xcode...

©h€ck øut µy stuƒƒ åt
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #3
That's not true, you can use Xcode to debug an application built in another way. You'll need to create an Xcode project, a custom executable, point that custom executable at the product of the makefile, then Xcode should be able to debug it just fine. Various IDE integration features may or may not work.

Anecdotally, I find Xcode's front end to be less reliable than GDB, and since reliability is at a premium when debugging, I prefer to stick with the command-line GDB.
Quote this message in a reply
Posts: 1,487
Joined: 2002.09
Post: #4
I dunno, the only real advantages XCode has is easily being able to set breakpoints and a nice source code browser. Half of the debugging I do in XCode is still from the "run" terminal anyway where I can easily evaluate expressions and view data structures without having to fold out a bajillion disclosure triangles. Also... as OSC says, it's much less buggy.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Posts: 45
Joined: 2006.07
Post: #5
Thanks, guys,
Quote this message in a reply
Posts: 312
Joined: 2006.10
Post: #6
If you're using CMake, why don't you generate an xcode project?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  SDL Project Stationary for Xcode Evan Stallings 11 9,422 Jul 9, 2013 05:17 PM
Last Post: Evan Stallings
  Converting unix SDL project to xcode Dominus 0 5,149 Jan 3, 2011 04:46 AM
Last Post: Dominus
  I would like to be able to browse an xCode project on my PC aerospaceman 8 9,670 Jun 29, 2009 07:11 PM
Last Post: aerospaceman
  XCode doesn't realize a library has changed unless you force your project to build. XSTNX 6 7,560 Jun 8, 2009 10:25 AM
Last Post: XSTNX
  Xcode 3.0 crashes on project load stevejohnson 7 8,000 Jan 30, 2008 11:12 PM
Last Post: gevapatz