IntelliJ IDEA 13.1.0 Web Help

Some features described here are available in Ultimate edition only.

To run or debug your Java EE or Web application, you need an application server run/debug configuration.

One such configuration may be created by IntelliJ IDEA automatically. This happens if you, when creating a project or module, specify an application server that you are going to use (see Defining a server when creating a project or module).

You can create more server run/debug configurations if and when needed.

Local and remote run configurations

A server run/debug configuration may be local or remote.

Local configurations are for servers installed on your computer. Such configurations include the settings that define how the corresponding server is to be started. Consequently, when you execute a local configuration, IntelliJ IDEA, among other things, will start the server.

Remote configurations don't start a server. Usually, they are used for servers running on different (remote) computers. They may as well be used for servers installed locally (on your computer) in cases when you don't want the run configuration to start (or stop) the server.

When you execute a remote configuration, IntelliJ IDEA will connect to the server to be able to deploy application artifacts or to perform their debugging. At that time, the corresponding server must already be running.

To conclude, what principally distinguishes local and remote configurations is not where the server is physically installed (though this is also important) but whether or not the server is started (or stopped) by IntelliJ IDEA or by other means that are external to IntelliJ IDEA.

What happens when a server run configuration is started

When you start a server run/debug configuration, IntelliJ IDEA, usually, does the following:

  1. Performs the Before Launch actions. By default, these are Make and Build Artifacts actions. (That is, IntelliJ IDEA compiles the project and builds the application artifacts. The Build Artifacts action is not initially present in a run configuration but added automatically as soon as you specify the artifacts to be deployed onto the server.)
  2. Starts the server (for a local configuration) or connects to the server (for a remote configuration). (At that moment, the Run or the Debug tool window opens so that you can monitor and control the process.)
  3. Deploys the specified artifacts (and/or deployable components external to your project) to the server.
  4. If so specified, starts a default web browser and opens a specified URL (which usually corresponds to a starting page of your application).
Creating a server run/debug configuration
  1. Open the Run/Debug Configurations dialog (e.g. Run | Edit Configurations).
  2. Click add ( or or or or ), select the server of interest (e.g. Tomcat Server) and, if available, select Local or Remote. (See Local and remote run configurations.)
  3. In the right-hand part of the dialog, specify the run/debug configuration settings and click OK. (For information on the available settings, see the corresponding server-specific topic in Run/Debug Configurations).
Starting a server run/debug configuration

An application server run/debug configuration can be started in a usual way, as any other run configuration. See Running Applications and Starting the Debugger Session.

Alternatively, you can use the Application Servers tool window (for this tool window to be available, the Application Servers View plugin must be enabled):

  1. To open the Application Servers tool window, do one of the following:
    • Select View | Tool Windows | Application Servers.
    • Click Application Servers on the bottom tool window bar.
  2. Select the server run/debug configuration which you want to use.
  3. On the toolbar of the tool window, click:
    • run to start the selected configuration in the run mode.
    • debug to start the selected configuration in the debug mode.

    As a result, the Run or the Debug tool window opens.

For more information on the features available in the Application Servers tool window, see Application Servers Tool Window.

See Also



Web Resources: