相关疑难解决方法(0)

在Visual Studio Code中调试Cypress测试

我想使用VS Code编辑和调试赛普拉斯测试。看起来这应该很简单;赛普拉斯文档直接提到了VS Code(但没有提供有关如何配置VS Code的launch.json文件以在此处或在调试页面上进行调试的任何线索)。我有一个启动cypress / electron的launch.json配置,但是VS Code给出此错误:

无法连接到运行时进程…连接ECONNREFUSED 127.0.0.1:5858

然后将其关闭。

查看VS Code项目示例电子没有帮助(添加protocolprogram属性无效)。

这是我的配置:

{
    "name": "Start integration_tests",
    "type": "node",
    "request": "launch",
    "stopOnEntry": false,
    "cwd": "${workspaceRoot}",
    "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/cypress",
    "runtimeArgs": [
        "open"
    ],
    "console" : "internalConsole",
    "port": 5858,
}
Run Code Online (Sandbox Code Playgroud)

visual-studio-code cypress

5
推荐指数
2
解决办法
2838
查看次数

标签 统计

cypress ×1

visual-studio-code ×1