Using Debuggers

Learn how we can debug our test cases using familiar tools and built-in commands.

Cypress lets us debug code in various ways. As it runs in the same event loop, we can use the same tools we normally would, such as using the debugger keyword or using DevTools.


Debug in a familiar way

Since, Cypress runs inside a browser, we have access to browser-specific objects, such as the document, the window, and the debugger.

We can use this keyword to stop the execution of test cases on the exact line where we add a debugger. However, note that if we try to debug one of our test cases in the following way, it won’t work:

Get hands-on with 1200+ tech skills courses.