[英]Debugging karma-jasmine tests with node-inspector
Install the node-inspector globally from NPM: 从NPM全局安装节点检查器:
npm install -g node-inspector
Then start the node-inspector and background the process (use fg to bring it back to the foreground and kill %1 to stop it): 然后启动节点检查器并对进程进行后台处理(使用fg将其恢复到前台并杀死%1以停止它):
node-inspector &
And then start your test runner like in debug mode this 然后像调试模式一样启动你的测试运行器
node --inspect ./node_modules/karma/bin/karma start
Then connect to the inspector from your local loopback. 然后从本地环回连接到检查器。 To start debugging, open the following URL in Chrome: chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/e771f282-5e94-4247-ac1c-89d7dc035129
要开始调试,请在Chrome中打开以下网址:chrome-devtools://devtools/bundled/inspector.html?experiments = true&v8only = true&ws = 127.0.0.1:9229/e771f282-5e94-4247-ac1c- 89d7dc035129
If all goes well, you'll see some developer tools from which to begin debugging. 如果一切顺利,您将看到一些开发人员工具可以从中开始调试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.