Search code examples
angularkarma-runner

How to debug Angular 10 tests in VS Code / Test Explorer UI?


I have the following setup:

VS Code 1.53.3    
Test Explorer UI (2.20.3)    
Angular/Karma Test Explorer (1.2.8)

When I create a new Angular 12 application, I can debug the tests from within VS Code using Test Explorer UI plugin.

When I create a new Angular 10 application the debugger doesn't hit the breakpoints. The breakpoint is greyed out with the "Unbound breakpoint" message.

What do I need to do so that I can debug the Angular 10 application from within VS Code?


Solution

  • The solution is to change the configuration in the Angular/Karma Test Explorer extension as described here.

    The confusing thing is that in Angular 12 no change is needed (it works out of the box) where is Angular 10 requires the change.

    If anyone can explain why that would be great.