【问题标题】:Protractor Debugging Issue - Waiting for the debugger to disconnect量角器调试问题 - 等待调试器断开连接
【发布时间】:2019-01-07 03:55:07
【问题描述】:

我正在尝试在 VSCode 上调试量角器脚本。

我编辑了 launch.json 文件,但调试控制台抛出以下错误。

这是 VSCode 调试控制台输出:

C:\Program Files\nodejs\node.exe --inspect-brk=45448 conf.js C:\Users\abc\AppData\Roaming\npm\node_modules\protractor\example/conf.js 

Debugger listening on ws://127.0.0.1:45448/ab61a2d7-4b40-456b-86cb-838e94dfe5b0

Debugger attached.

Waiting for the debugger to disconnect...

我也无法在网上任何地方找到解决方案。

【问题讨论】:

    标签: node.js visual-studio-code protractor vscode-settings vscode-debugger


    【解决方案1】:

    当您在 VSCode 中设置断点时,您需要运行以下命令:

    node --inspect-brk ./node_modules/.bin/protractor conf.js

    以上路径假设 Protractor 安装在项目本地的 node_modules/.bin/ 目录中。

    接下来导航到chrome://inspect。你将不得不跳过 Protractor 的入口点,然后你应该点击你的断点。确保您使用的是节点 8 以避免获得 polyfill-ed 承诺。

    我们在ng-conf video 中详细讨论了这一点。我们以a script 开始测试,它使用了这个e2e-debug command,它与上面的等价。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-31
      • 2019-02-19
      • 1970-01-01
      • 2013-06-25
      • 1970-01-01
      • 2020-03-26
      • 1970-01-01
      相关资源
      最近更新 更多