Ktor 1.5.4 Help

Development mode

Ktor provides a special mode targeted for development. This mode enables the following capabilities:

  • The auto-reload feature for reloading application classes without restarting the server.

  • Extended information for debugging pipelines (with stack traces).

  • Extended debugging information on a response page in a case of a 5** server error.

Enable development mode

You can enable development mode in different ways: in the application configuration file, using a dedicated system property or environment variable.


To enable development mode in the application.conf file, set the development option to true:

ktor { development = true }

The 'io.ktor.development' system property

The io.ktor.development system property allows you to enable development mode when running your application:

  • To run an application in development mode using IntelliJ IDEA, pass io.ktor.development with the -D flag to VM options:

  • If you run your application using a Gradle task, you can pass io.ktor.development to the applicationDefaultJvmArgs property in a build.gradle file:

    application { applicationDefaultJvmArgs = ["-Dio.ktor.development=true"] }
    application { applicationDefaultJvmArgs = listOf("-Dio.ktor.development=true") }

The 'io.ktor.development' environment variable

To enable development mode for a Native client, use the io.ktor.development environment variable.

Last modified: 19 April 2021