debugging - Protractor Visual Studio 代码调试错误无法连接到运行时进程,10000 秒后超时
问题描述
Protractor Visual Studio Code Debug Error 无法连接到运行时进程,10000 秒后超时 - (原因:无法连接到目标:连接 ECONNREFUSED 127.0.0.1:36406)。
下面是我的launch.json文件配置
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch via npm",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "npm.cmd",
"runtimeArgs": [
"run-script", "regression_sat",
"--inspect=5858"
]
},
{
"type": "node",
"request": "attach",
"name": "Attach to Process",
"port": 5858
}
]
}
下面是带有脚本标签的 package.json 文件
"scripts": {
"webdriver-start": "npm_webdriver.bat",
"protractor": "protractor_batch.bat"
"regression_sat": "node_modules/.bin/protractor.cmd ./config/protractor.chrome.conf.js --suite suite_sat --params.env sat"
}
解决方案
导致此错误的最可能原因是调试会话终止时 Visual Studio 启动的浏览器窗口仍在运行。这会阻止下一个调试会话成功启动。
完成调试会话后,关闭浏览器窗口本身,而不是运行应用程序的选项卡。这将确保下一个调试会话可以启动浏览器的新实例进行调试。
推荐阅读
- vue.js - 如何在您是 Google Workplace 成员的电子表格中切换侧边栏?
- php - 在laravel中使用外键迁移时出错
- bash - Bash 排序未正确按时间排序
- karate - 如何为空手道 UI 自动化中运行的所有场景仅自定义一次 chrome 驱动程序调用
- javascript - 获取多个 url 然后相应地设置状态 React Native
- intellij-idea - 如何使用终端从 ubuntu 20.04 LTS 卸载任何软件?
- python - Python 如何将当前目录添加到 sys.path
- javascript - Vue3 在子组件中使用 v-model
- java - Function with .random() method malfunctions after a few runs for no apparent reason
- node.js - when I install jupyterlab-kite build error