WebStorm 6.0.1 Web Help

Besides simply executing JSTestDriver unit tests without the possibility to analyze the problems that arise, WebStorm provides the possibility to debug unit tests just like JavaScript source code.

To debug JavaScript unit tests
  1. Prepare the unit tests to run.
  2. In the unit tests, set the breakpoints for WebStorm to postpone test execution at.
  3. Create a test runner configuration file.
  4. Start a WebStorm default JSTestDriver test server.
  5. Capture a browser to execute the tests in.
  6. Create a JSTestDriver run configuration. If you have captured two browsers, specify the browser for debugging the tests: in the Debug tab of the Run/Debug Configuration: JSTestDriver dialog box, choose the relevant browser from the Debug drop-down list. The available options are Chrome and Firefox.
  7. Choose Run | Debug on the main menu, or click Debug button debug on the toolbar, or press Shift+F9Shift+F9.
  8. In the Debug tool window that opens, proceed as usual: step through the program, stop and resume program execution, examine it when suspended, etc.

See Also

Procedures:

Reference:

Web Resources: