Search code examples
macosxcode4

Debugging using Xcode


This question might be trivial or duplicate. I am on Mac OS X. I have an exe (.app for Mac OS X) compiled using makefile without Xcode. I want to debug this application using Xcode. (Application can be debugged as it is compiled using -g option). Now, I want to debug this exe using Xcode. How to do this in Xcode?

In Windows using Visual Studio, I can open exe under Visual Studio using "devenv application" and then debug.

How can this be achieved in Mac OS X system?

I am using Xcode 4.4.


Solution

  • I did in following way:

    1. Create an empty project under Xcode.
    2. Under Product > New Scheme, add a scheme.
    3. Under Run, choose the exe or application.

    Now, put the break points and run the exe.