How to use Xcode 6 debugging for single C file [closed]

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?

Thanks.


Solution 1:

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.