WebStorm, Karma and Angular. How to debug angular service

I suggest that I ask what the correct procedure is.

I am running Webstorm 7.0.3. I do not have node setup. I am using hosting on my local computer.

I wrote unit tests and can put the debug breakpoint in the test.js. When I right-click and debug my karma.conf.js file, it handles these breakpoints very well. This is great for basic things, but sometimes I need to go line by line inside a service.

Any breakpoints that I place inside the service are skipped and ignored.

I should assume that this is because karma completes my actual script in some proxy file to execute.

How can I execute a service line by line? I feel like I missed something very obvious.

[Update] @Eitan's comment was what I needed. I suggested that the karmic task runner automatically wrapped the whole source in an illegible, illegible non-sense. I never thought that the coverage preprocessor was responsible for this. Commenting that the coverage reporter and the karma preprocessor now allow me to debug my unit tests from a karma chrome instance and a web server.

+4
source share
2 answers

Are you using a coverage reporter? It uses tool code, so I think you cannot debug the source file

+5

dev-tools. , WebStorm , ( ). DEBUG chrome, , dev-tools.

+2

All Articles