Debug Console Program XCode

I’m trying to develop a custom console program and XCode won’t run it because the .app isn’t built. Whats do I need to do so that I can debug the app using XCode as it’s crashing because of pure virtual function being called.