Xcode 6 has Run, build, pretty much everything in debug menu greyed out for a single C file that I open in Xcode. This is a prebuilt program. I wish to debug it, and make changes to the file, but it seems that it must be a project to use debug functionality. Is this true?

I am in university so I wish to have single files as they are submitted like that. If it is not possible to debug on Xcode, are there any better recommendations?


closed as off-topic by bmike Apr 3 '16 at 21:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about software development are off-topic here, but can be asked on Stack Overflow." – bmike
If this question can be reworded to fit the rules in the help center, please edit the question.


You need to have project in order to be able to debug in Xcode. Xcode has to know how to compile/link/build Your files. You can make it very quickly by creating Command line tool. Go to File -> New.. -> Project... N. Choose OS X -> Application -> Command Line Tool. On the next screen choose language to be C. Then You'll have new project with main.c file where You can start coding and debugging.

  • 3
    To make it clearer you do not debug a file you debug a program that has been compiled from one or more files - so you have to tell Xcode about the program – Mark Dec 3 '14 at 10:41

Not the answer you're looking for? Browse other questions tagged .