If your tests aren't working as you expect, you can debug them in both the default Node.js environment and in a real browser.
Debugging in the default Node.js environment is often the quickest way to diagnose issues that are not related to browser-specific APIs or rendering.
ng test command with the --debug flag:ng test --debug
The same way you start a debugging session with in Node, you can use ng test with the --debug flag with Vitest and browser mode.
The test runner will start in debug mode and wait for you to open the browser devtools to debug the tests.
Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/guide/testing/debugging