TestCafe v2015.1   |   Documentation
The documentation on this webpage describes TestCafe v2015.1. This product is no longer available and has been replaced by TestCafe Studio. TestCafe Studio is our new cross-platform IDE for end-to-end web testing.
To learn more about TestCafe Studio, please visit www.devexpress.com/testcafestudio

TEST DEBUGGING

The majority of modern browsers ship with integrated Web Developer tools, including JavaScript debuggers. And since TestCafe tests run JavaScript code, you can use your browser's built-in debugger to analyze your test code. To set up a breakpoint in your code, use the debugger keyword.

debugger;

Most browsers allow for breaking script execution only when developer tools are invoked. Therefore, we suggest the following workflow when you are debugging tests.

  1. Launch the target browser and click the Run button for the desired test, fixture or folder.
    Run a Test Task
  2. This invokes the Run Test dialog. Make sure that no check box in the Browsers and Connected Workers sections is selected so that the test will run in the current window. Invoke Web Developer Tools and click Run.
    Running a Test

The test will start and when the breakpoint is reached, test execution will be suspended.

Test Stopped as the Breakpoint Reached