Summary

Your browser developer tools are better suited for debugging your browser application. However, if you run into Zombie-specific issues, there are several techniques that may help you.

One is to enable the Zombie debugging output. This will show you which resources the browser is loading and what the corresponding response status codes that are shown alongside are.

You can run specific tests. When debugging a specific problem in a test, you can also restrict Mocha to run only that test by using the -g <pattern> option.

You can use the console.log command in the code that runs in the browser; the output will appear in the console.

You can view the current browser state. You can inspect the browser state by using the browser.dump call, or by logging the result of browser.html to the console.

If you need to access the whole document at some stage of your test, you can also log the return value of browser.html().