Executing Swift Code#

Noctule supports running the executables of Swift Package Manager projects and Xcode projects.

Several types of run configurations are provided for this.

Run Configuration “Swift Package Run”#

This run configuration runs the executables of a Swift Package Manager project. It executes swift run commands with an optional build step.

Settings#

Swift toolchain
The toolchain used to execute the swift run command.
Package directory
The Swift Package directory. The swift run command is executed in this directory. Only packages with executable products are listed here.
Product
Choose the executable product to run.
Program arguments
If you would like to pass additional arguments to the swift run command, then enter them here.
Environment variables
Here, you can define environment variables that are passed to the swift run command.
Build Settings
This section configures the fine-grained build settings. If you don’t change them, then the default values from Noctule’s directory settings are used.

Before Launch#

By default, the build step “Run Swift Build” is added in this section. It builds only the executable product before running it. You can remove it to skip the build step of swift run. Swift can only run the executable if it has been built before.


Next: Running Swift Tests