-->

Node Inspector not hitting breakpoint for Intern t

2019-09-10 05:35发布

问题:

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 ?

回答1:

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