CLion 2017.2 Help

Run/Debug Configuration: JavaScript Debug

In this dialog box, create a configuration to be used for debugging JavaScript in applications running on the built-in or on an external web server and for debugging Dart web applications.

CLion supports debugging applications running on the built-in or an external web server only in Google Chrome and other browsers of the Chrome family. Debugging applications running on the built-in server is supported for Firefox, version 36 an higher, through the Firefox Remote debug configuration. Debugging applications running on external web servers in Firefox is not supported at all.

On this page:

JavaScript Debug-specific configuration settings

ItemDescription
NameIn 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 Debugger page of the Settings dialog box.

  • Debugging a Dart web application:

    In this text box, specify the URL address of the HTML file that references the Dart code to debug in the format: http://localhost:<built-in server port>/<project-name>/<relative path to the HTML file>. Make sure the port in this URL address is the same as the Built-in server port on the Debugger page and the port from the Chrome Extension settings.

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, the Dart code is executed natively. If you choose Chrome, the Dart code is compiled into JavaScript through the dart2js or dartdevc tool. The tool is invoked automatically when you run or debug a Dart web application.

    Specify the URL address of the HTML file that references the Dart code to debug in the format: http://localhost:<built-in server port>/<project-name>/<relative path to the HTML file>. Make sure the port in this URL address is the same as the Built-in server port on the Debugger page and the port from the Chrome Extension settings.

Remote URLs of local files
  • Debugging JavaScript:

    CLion 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, CLion itself "retrieves" the paths to local files by parsing the URL addresses of their copies on the server.

  • Debugging a Dart web application:

    CLion 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.

Last modified: 26 October 2017

See Also