Skip to content

Xcode

If you're on a Mac, you can develop your Vapor project using Xcode. You can build, run, and stop your server from within Xcode, as well as use breakpoints to debug your code.

screen shot 2017-05-15 at 7 14 48 pm

To use Xcode, you will first need to generate a *.xcodeproj file.

Generate Project

Vapor Toolbox

To generate a new Xcode project for a project, use:

vapor xcode

Tip

If you'd like to automatically open the Xcode project, use vapor xcode -y

Select 'Run'

Make sure after generating your Xcode project that you properly select the executable if you're trying to run your application.

select 'run' from dropdown

Manual

To generate a new Xcode project manually.

swift package generate-xcodeproj

Open the project and continue normally.