Yura Zenevich home

TIL Debugging Mochitests.

24 Feb 2014 - Toronto, ON

Turns out there's an easy way to debug Chrome JS in mochitests, as described by Gijs Kruitbosch in his blog: Debugging Chrome JS and Mochitest Redux. All you need to do is to use the --jsdebugger flag. Your tests will start with the debugger enabled by default and stopped before their execution. You can add breakpoints on the fly or use the debugger; command in your JavaScript code.

Here's an example of running some of the a11y tests from your gecko-dev directory:

./mach mochitest-a11y --jsdebugger accessible/tests/mochitest/jsat/

yzen