Run/Debug Configuration: JavaScript Debug
In this dialog box, create a configuration to be used for debugging JavaScript sources locally and remotely
and for debugging Dart Web applications.
WebStorm supports JavaScript debugging in Chrome and Firefox.
In Google Chrome and other browsers of the Chrome family,
all the debugging modes are supported.
In Firefox, remote debugging is not supported at all. For versions 33, 34, and 35,
local debugging through a Firefox Remote debug configuration is supported as a temporary workaround.
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.
The shared run/debug configurations are kept in separate xml files under .idea\runConfigurations folder,
while the local run/debug configurations are kept in
the .idea\workspace.xml .
This check box is not available when editing the run/debug configuration defaults.
|
URL |
-
Debugging JavaScript:
In this text box, specify the URL address of the HTML file that references the JavaScript to debug.
For local debugging, type the URL in the format http://localhost:<built-in server port>/<project root> .
The built-in server port (1024 or higher) is specified on the Data Views page of the Settings dialog box.
-
Debugging a Dart Web application:
In this text box,
specify the URL address of the HTML file the references the Dart code to debug.
Make sure that the port specified in this URL address is the same as the Built-in server port
on the Debugger page of the Settings dialog box and the port specified
in the settings for the Chrome Extension.
|
Browser |
From this drop down list, select the browser, where your application will be debugged.
-
Debugging JavaScript:
Chrome
-
Debugging a Dart Web application:
If you choose Dartium which has a built-in Dart virtual machine, simply the Dart code is executed.
If you choose Chrome, the Dart code is compiled into JavaScript through the Dart2js tool,
which is a part of the Pub tool. Whether such compilation is required or not is decided
by the Pub Serve tool.
The tool is invoked automatically when you run or debug a Dart web application, either by opening an HTML file or by launching a run/debug configuration.
The tool analyzes the <script></script> element in the HTML file. If the element references a Dart file, Pub Serve invokes the Dart2js compiler
whereupon the compiled JavaScript files are passed to the browser where they are processed.
Specify the URL address of the HTML file the references the Dart code to debug.
Make sure that the port specified in this URL address is the same as the Built-in server port
on the Debugger page of the Settings dialog box and the port specified
in the settings for the Chrome Extension.
|
Remote URLs of local files |
-
Debugging JavaScript:
WebStorm displays this area only when you create a permanent debug configuration manually.
For automatically generated temporary configurations the area is not shown.
In this area, map the local files to be involved in debugging to the URL addresses of their copies on the server.
- File/Directory - in this read-only field, select the desired local file or directory in the project tree.
- Remote URL - in this text box, type the absolute URL address of the corresponding file or folder on the server.
These mappings are required only if the local folder structure under the project root differs from the folder structure on the server. If the structures are identical,
WebStorm itself "retrieves" the paths to local files by parsing the URL addresses of their copies on the server.
-
Debugging a Dart Web application:
WebStorm displays this area only when the port specified in the URL field
is different from the port of the built-in Web server specified on the Debugger page
of the Settings dialog box.
|
Toolbar
Common Options
Item | Description |
---|
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.
|
Temporary configurations limit | Specify here the maximum number of temporary configurations to be stored and shown in the
Select Run/Debug Configuration drop-down list. |
Share |
Select this check box to make the run/debug configuration available to other team members.
The shared run/debug configurations are kept in separate xml files under .idea\runConfigurations folder,
while the local run/debug configurations are kept in
the .idea\workspace.xml .
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, WebStorm 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.
Item | Keyboard shortcut | Description |
---|
|
Alt+Insert
| Click this icon to add a task to the list. Select the task to be added:
|
|
Alt+Delete
| Click this icon to remove the selected task from the list. |
|
Enter
| Click this icon to edit the selected task.
Make the necessary changes in the dialog that opens. |
|
Alt+Up
|
Click this icon to move the selected task one line up in the list. |
|
Alt+Down
|
Click this icon to move the selected task one line down in the list. | Show this page | |
Select this check box to have the run/debug configuration settings shown prior to
actually starting the run/debug configuration. | Active tool window | | Select this option if you want the Run/Debug tool windows
to be activated automatically when you run/debug your application. This option is enabled by default. |
|
Last modified: 11 July 2016