WebStorm 2016.2 Help

Running and Debugging JavaScript

On this page:

To run a file with injected JavaScript from WebStorm

No run configuration is required for launching applications with injected JavaScript from WebStorm. You just open the HTML page with the reference to the required script in the browser and that's it.

  1. In the editor, open the HTML file with the JavaScript reference. This HTML file does not necessarily have to be the one that implements the starting page of the application.
  2. Do one of the following:
    • Choose View | Preview file in on the main menu or press Alt+F2. Then select the desired browser from the pop-up menu.
    • Hover your mouse pointer over the code to show the browser icons bar: browserIcons Click the icon that indicates the desired browser.

To debug JavaScript code, perform these general steps:

  1. Configure the JavaScript debugger.
  2. Configure and set breakpoints in the JavaScript code as required.
  3. Initiate a debugging session.
  4. If you are using Chrome or Dartium, install and configure the JetBrains Chrome Extension. For details, see Using JetBrains Chrome Extension.
  5. Step through the program, stop and resume program execution, examine it when suspended, etc.

See Also

Last modified: 15 November 2016