NG测试中的调试测试 [英] Debug Tests in NG Test
本文介绍了NG测试中的调试测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Angular CLI和VSCode,但是运行ng test
时我的spec文件中的断点似乎都没有命中?
I am using Angular CLI and VSCode but none of my breakpoints in my spec files seem to be getting hit when I run ng test
?
我需要做一些配置吗?
推荐答案
其他答案是完全有效的答案,但是已经使用Angular大约18个月了,现在我倾向于在浏览器中使用chrome工具!
The other answers are completely valid answers but having been using Angular for around 18 months now I tend to do it in the browser - chrome tools!
运行ng test,然后按f12并通过webpack上下文找到规范文件.添加一个断点并刷新,它将达到所述断点.按照屏幕截图
Run ng test then f12 and find the spec file via the webpack context. Add a breakpoint(s) and refresh and it will hit said breakpoints. As per screenshot
这篇关于NG测试中的调试测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文