Do you have karma-coverage set up in your karma config? It uses instrumented code, so debugging is not possible. Related tickets: http://github.com/karma-runner/karma/issues/630, http://youtrack.jetbrains.com/issue/WEB-8443
Answer from lena on Stack OverflowHow can I debug a JS Unit Test with Karma & Jasmine in Intellij or Webstorm
Cannot debug Karma tests in Webstorm - javascript
Angular 9: Karma Test debugging in library with WebStorm - Stack Overflow
How to debug single Karma test using WebStorm - Stack Overflow
Videos
Do you have karma-coverage set up in your karma config? It uses instrumented code, so debugging is not possible. Related tickets: http://github.com/karma-runner/karma/issues/630, http://youtrack.jetbrains.com/issue/WEB-8443
If you are building with Webpack you might need to specify the devtools option in your webpack config property in karma.conf.js like this:
module.exports = (config) => {
config.set({
webpack: {
...,
devtool: 'inline-source-map'
}
})
};
This solution works for me with Webpack v3.
The above answer is right, but before that you have to install chrome extension Jetbrains IDE support plugin, and then you can debug in your WebStorm.
You can debug on your browser. Just click on the DEBUG button, find your class and add a breakpoint wherever you want. To run it again, just refresh the page.


