IntelliJ IDEA 2021.2 Help

Run/Debug Configuration: Spring Boot

This page describes controls. For more information on how to work with Spring Boot in IntelliJ IDEA, refer to Spring Boot.

Configuration tab

Main class

Specify the fully qualified name of the class that will be executed (passed to the JRE).


VM options

If necessary, specify the command-line options to be passed to the server JVM at the server start.

  • Use spaces to separate options, for example, -client -ea -Xmx1024m.

  • If an option includes spaces, enclose the spaces or the argument itself in double quotes, for example, some" "arg or "some arg".

  • If an option includes double quotes as part of the argument, escape the double quotes using backslashes, for example, -Dmy.prop=\"quoted_value\".

  • You can pass environment variable values to custom Java properties. For example, if you define a variable MY_ENV_VAR, you can pass it to the foo property:


Program arguments

Specify arguments to be passed to the program in the format that you use in the command line. Use the same rules as for specifying the VM options.

Working directory

If necessary, specify a directory that will be used by the running application. This directory is the starting point for all relative input and output paths. The project directory is specified by default.

Environment variables

Click Browse to create variables and specify their values.

Use classpath of module

Select the module whose classpath will be used to run the application.

Add dependencies with “provided” scope to classpath

Enable this option to add dependencies with the Provided scope to the runtime classpath.


By default, the newest JDK from the module dependencies is used to run applications. You can specify an alternative JDK or JRE.

Shorten command line

Select a method that will be used to shorten the command line if the classpath gets too long or you have many VM arguments that exceed your OS command line length limitation:

  • none: IntelliJ IDEA will not shorten a long classpath. If the command line exceeds the OS limitation, IntelliJ IDEA will be unable to run your application and will display a message suggesting you to specify the shortening method.

  • JAR manifest: IntelliJ IDEA will pass a long classpath via a temporary classpath.jar. The original classpath is defined in the manifest file as a class-path attribute in classpath.jar. Note that you will be able to preview the full command line if it was shortened using this method, not just the classpath of the temporary classpath.jar.

  • classpath.file: IntelliJ IDEA will write a long classpath into a text file.

Spring Boot

Enable debug output

Enables logging of the debug output by adding the -Ddebug VM option.

Hide banner

Hides the Spring Boot startup banner by adding the -Dspring.main.banner-mode=OFF VM option (for Spring Boot 1.4.x and earlier, the option is -Dspring.main.banner=false).

Enable launch optimization

Select this option to speed up application launch. The -XX:TieredStopAtLevel=1 and -noverify VM options will be added.

Enable JMX agent

Enables JMX agent that shows application endpoints data by adding the following VM options (requires Spring Boot 1.3.0 or later):


  • -Dspring.jmx.enabled=true

  • -DSpring.liveBeansView.mbeanDomain

  • -Dspring.application.admin.enabled=true

IntelliJ IDEA uses local JMX connector for retrieving Spring Boot actuator endpoint's data. However, it is impossible to get local JMX connector address if Spring Boot application and IntelliJ IDEA JVMs have different bitness and you are using OpenJ9 JDK. In this case, add the following lines to VM options:




On 'Update' action

Specify an action that the IDE will do after you click Update <application name> Application:

  • Update resources — compile all modified and dependent resource files.

  • Update classes and resources — compile all modified and dependent files.

  • Update trigger file — update the trigger file. Set up the trigger filename by adding the -Dspring VM option.

  • Hot swap classes and update trigger file if failed — (available only in the debug mode) compile all modified and dependent files, hot swap classes, update the trigger file if the hot swap failed. Specify the trigger filename by adding the -Dspring.devtools.restart.trigger-file=.restartTriggerFile VM option.

On frame deactivation

Specify an action that the IDE will do after you switch to another application (other than IntelliJ IDEA):

  • Update resources — compile all modified and dependent resource files.

  • Update classes and resources — compile all modified and dependent files.

Active profiles

Specify active Spring profiles that you want to use in this run/debug configuration.

Override parameters

Use this table to specify Spring Boot configuration parameters that you want to override. Such parameters are normally defined in configuration files. Listing them in a run/debug configuration allows you to easily switch parameters by modifying the run/debug configuration instead of config files, or have multiple run/debug configurations with different parameter values.

Code Coverage tab

Use this tab to configure code coverage monitoring options.

Choose coverage runner

Select the desired code coverage runner.

By default, IntelliJ IDEA uses its own coverage engine with the Sampling mode. You can also choose JaCoCo or Emma for calculating coverage.


Select this option to measure code coverage with minimal slow-down.


Select this option to collect accurate branch coverage. This mode is available for the IntelliJ IDEA code coverage runner only.

Track per test coverage

Select this checkbox to detect lines covered by one test and all tests covering line.

Packages and classes to record code coverage data

Click the Add button and select the Add Class button Add Class or the Add Package button Add Package to specify classes and packages to be measured. You can also remove classes and packages from the list by selecting them in the list and clicking the Remove button.

Enable coverage in test folders

If this checkbox is selected, folders marked as test the Test Root icon are included in the code coverage analysis.

Logs tab

Use this tab to specify which log files generated while running or debugging must be displayed in the console of the Run/Debug tool window.

Log files to be shown in console

In this table, specify a file or a group of files that will be displayed in the Run/Debug tool window.

Save console output to file

Save console output to the specified location.

Show console when a message is printed to standard output stream

Enable the output console and bring it forward if the associated process is writing to Standard.out.

Show console when a message is printed to standard error stream

Enable the output console and bring it forward if the associated process is writing to Standard.err.

Before launch options

Use this section to specify which tasks must be carried out before starting the run/debug session. The tasks you specify will be performed in the order that they appear in the list.

Show this page

This option shows the run/debug settings before starting a run/debug session.

Activate tool window

Select the checkbox to open the Run/Debug tool window once you run the session.

Last modified: 02 August 2022