Debugging karma-jasmine tests with node-inspector

帅比萌擦擦* 提交于 2019-12-04 08:42:07

Install the node-inspector globally from 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):

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

If all goes well, you’ll see some developer tools from which to begin debugging.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!