Member-only story
How to Use Chrome DevTools to Debug Unit Test Cases
Better debugging with Chrome DevTools

How do you debug unit test cases? There are two popular methods:
- Use the built-in capability of Visual Studio Code (commonly known as VS Code)
- Use Chrome the DevTools built-in debugger
In this article, we’re going to cover the second method: Using Chrome DevTools to debug unit test cases.
What is Node.js? It’s an open-source and cross-platform JavaScript runtime environment. It can be interchangeably called NodeJS, nodejs, or node. It is a popular tool for Web development. Node.js runs the V8 JavaScript engine, the core of Google Chrome, outside the browser. This allows us to use Node.js and Chrome DevTools to debug unit test cases.
Debug the Original Create React App Unit Test Cases
Let’s use Facebook’s famous Create React App as an example. There’s one unit test file, src/App.test.js
, in the codebase: