节点检查器未触发实习测试的断点 [英] Node Inspector not hitting breakpoint for Intern test

查看:180
本文介绍了节点检查器未触发实习测试的断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用节点检查器调试我的实习测试。我从这里正确地遵循了所有步骤。我通过执行以下命令给它一个运行


  1. 启动Selenium [实习测试]

  2. 在节点环境中运行实习测试



    C:\\\
    ode\\\
    ode --debug -brk node_modules / intern / runner.js config = tests / intern


  3. 在另一个cmd中,我运行节点检查器



    node-inspector --web-port = 9999&


  4. 启动浏览器



    http://127.0.0.1:9999/?ws=127.0.0.1:9999&port=5858


我可以看到我的项目的所有脚本。我在其中一个测试组件中设置了断点。但是当我恢复调试器的时候,测试开始运行,但断点从不被打。我究竟做错了什么 ?

解决方案

我认为你应该添加 debugger; 断点


I am trying to debug my intern test using node inspector. I followed all the steps correctly from here. I gave it a run by performing the following command

  1. Start Selenium[for intern test]
  2. Run the intern test in node environment

    C:\node\node --debug-brk node_modules/intern/runner.js config=tests/intern

  3. In another cmd I run the node inspector

    node-inspector --web-port=9999 &

  4. Start the browser

    http://127.0.0.1:9999/?ws=127.0.0.1:9999&port=5858

I can see all the script of my project. I have break point set in one of the test component. But the moment I resume the debugger the test start running but the breakpoint is never hit. What am I doing wrong ?

解决方案

I think you should add debugger; into your script as a break point

这篇关于节点检查器未触发实习测试的断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆