Run/Debug Configuration: JavaScript Debug
This feature is supported in the Ultimate edition only.
In this dialog box, create a configuration to be used for debugging JavaScript sources locally and remotely and for debugging Dart Web applications.
-
Local debugging. In this mode, the application files remain where they are in the IntelliJ IDEA project on you machine.
IntelliJ IDEA runs them on the built-in Web server with the root URL
http://localhost:<built-in server port>/<project root>
. The built-in server port (1024 or higher) is specified on the JavaScript page of the Settings dialog box. A debugging session in this mode can be initiated in two ways:- Open the HTML file with the JavaScript injection to be tested and launch the temporary run/debug configuration that IntelliJ IDEA has generated automatically. This approach it helpful when you do not need to debug the entire application but just one script.
- Create and launch a permanent debug configuration.
-
Remote debugging. In this mode, the application files are on an external web server
and you have their copies in a IntelliJ IDEA project on your computer.
No matter, whether the web server itself is running on a physically remote host or on your machine,
application files deployed on it are treated as remote.
For details, see Deployment. Working with Web Servers.
You can deploy the application files to a web server and launch the application yourself or debug an already running application.
When a remote HTML file with a JavaScript injection is opened, the debugger tells IntelliJ IDEA the name of the currently processed file and the number of the line to be processed. IntelliJ IDEA opens the local copy of this file and indicates the line with the provided number. This behaviour is enabled by specifying correspondence between files and folders on the server and their local copies. This correspondence is called mapping, it is set in the debug configuration.
A Remote debugging session can be initiated only through a permanent debug configuration that you have to define yourself manually.
IntelliJ IDEA supports local and remote JavaScript debugging only in Google Chrome and other browsers of the Chrome family. In Firefox, remote debugging is not supported at all. Local debugging is supported for Firefox, version 36 an higher, through the Firefox Remote debug configuration.
IntelliJ IDEA supports local and remote JavaScript debugging only in Google Chrome and other browsers of the Chrome family. In Firefox, remote debugging is not supported at all. Local debugging is supported for Firefox, version 36 an higher, through the Firefox Remote debug configuration.
On this page:
JavaScript Debug-specific configuration settings
Item | Description |
---|---|
Name | In this text box, specify the name of the current run/debug configuration. |
Share |
Select this check box to make the run/debug configuration available to other team members.
If the directory-based project format is used,
the settings for a run/debug configuration are stored in a separate .xml file in the
If the file-based format is used,
the settings are stored in the This check box is not available when editing the run/debug configuration defaults. |
URL |
|
Browser |
From this drop down list, select the browser, where your application will be debugged.
|
Remote URLs of local files |
|
Toolbar
Item | Shortcut | Description |
---|---|---|
Alt+Insert | Click this button to add a new configuration to the list. | |
Alt+Delete | Click this button to remove the selected configuration from the list. | |
Ctrl+D | Click this button to create a copy of the selected configuration. | |
Edit defaults | Click this button to edit the default configuration templates. The defaults are used for newly created configurations. | |
or | Alt+Up or Alt+Down | Use these buttons to move the selected configuration or folder up and down in the list.
The order of configurations or folders in the list defines the order in which configurations appear in the Run/Debug drop-down list on the main toolbar. |
Move into new folder / Create new folder | Use this button to create a new folder.
If one or more run/debug configurations are in focus, the selected run/debug configurations are automatically moved to the newly created folder. If only a category is in focus, an empty folder is created. Move run/debug configurations to a folder using drag-and-drop, or the buttons. | |
Sort configurations | Click this button to sort configurations in alphabetical order. |
Common options
Item | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | In this text box, specify the name of the current run/debug configuration. This field does not appear for the default run/debug configurations. | ||||||||||||||||||||||||
Defaults | This node in the left-hand pane of the dialog box contains the default run/debug configuration settings. Select the desired configuration to change its default settings in the right-hand pane. The defaults are applied to all newly created run/debug configurations. | ||||||||||||||||||||||||
Share |
Select this check box to make the run/debug configuration available to other team members.
If the directory-based project format is used,
the settings for a run/debug configuration are stored in a separate .xml file in the
If the file-based format is used,
the settings are stored in the This check box is not available when editing the run/debug configuration defaults. | ||||||||||||||||||||||||
Single instance only | If this check box is selected, this run/debug configuration cannot be launched more than once.
Every time a new run/debug configuration is launched, IntelliJ IDEA checks the presence of the other instances of the same run/debug configuration, and displays a confirmation dialog box. If you click OK in the confirmation dialog box, the first instance of the runner will be stopped, and the next one will take its place. This makes sense when the usage of certain resources can cause conflicts, or when launching two run/debug configurations of the same type consumes too much of the CPU and memory resources. If this check box is not selected, it is possible to launch as many instances of the runner as required. So doing, each runner will start in its own tab of the Run tool window. | ||||||||||||||||||||||||
Before launch | Specify which tasks must be performed before applying the run/debug configuration.
The specified tasks are performed in the order they appear in the list.
|