node.js - 量角器调试问题 - 等待调试器断开连接
问题描述
我正在尝试在 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...
我也无法在网上的任何地方找到解决方案。
解决方案
在 VSCode 中设置断点时,需要运行以下命令:
node --inspect-brk ./node_modules/.bin/protractor conf.js
上面的路径假定 Protractor 安装在node_modules/.bin/
项目本地的目录中。
接下来导航到chrome://inspect
。你将不得不跳过 Protractor 的入口点,然后你应该点击你的断点。确保您使用的是节点 8 以避免获得 polyfill-ed 承诺。
我们在ng-conf 视频中详细介绍了这一点。我们使用与上述等效的e2e-debug 命令的脚本开始测试。
推荐阅读
- wordpress - 如何将自动完成建议视为 WordPress 中该帖子的链接?
- php - 谁在数据库级别工作,它们显示在工作台 phpMyAdmin 中?
- c# - 如何在分组的语义缩放 ListView 上显示要显示的文本?
- r - 在 R 中使用 Googleways 计算交通距离时无法使用 Arrival_time
- keycloak - OIDC和SAML可以和keycloak一起工作吗
- python - python - 如何在python的for循环中更新两个变量以获取复利方程
- angular - 使用 Net Core 2.1 和 Angular 2 创建使用 Google 登录选项时出现问题
- html - 页面左右两侧输入表格
- javascript - Discord.js - 我将如何集成 PayPal 发票 API?
- python - 有没有比这更好的从列表中随机选择的方法: