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 Node.js
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.
- Run the
ng testcommand with the--debugflag:ng test --debug - The test runner will start in debug mode and wait for a debugger to attach.
- You can now attach your preferred debugger. For example, you can use the built-in Node.js debugger in VS Code or the Chrome DevTools for Node.js.
Debugging in a browser
Debugging with Vitest and browser mode is not supported today.