Protractor 如何在grunt Progrator runner v5、Progrator v4.0.14和node v8.13中配置调试

Protractor 如何在grunt Progrator runner v5、Progrator v4.0.14和node v8.13中配置调试,protractor,gruntjs,Protractor,Gruntjs,我最近转到了一个项目,以重新构建整个企业量角器代码库。我们使用节点v8.13、量角器v4.0.14和grunt量角器runner v5。我愿意用vscode或chrome进行调试 下面是我如何配置 vscode launch.json { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For m

我最近转到了一个项目,以重新构建整个企业量角器代码库。我们使用节点v8.13、量角器v4.0.14和grunt量角器runner v5。我愿意用vscode或chrome进行调试

下面是我如何配置

vscode 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 Program",
            "stopOnEntry": false,
            "program": "${workspaceRoot}/node_modules/protractor/bin/protractor",  // path the protractor node modules.
            "args": [
                "${workspaceRoot}/build/config/config.js" // path to compiled protractor configuration file.
            ],
            "preLaunchTask": null,
            "sourceMaps": true,
            "outFiles": [ "${workspaceRoot}/build/**/*.js" ]
        }
    ]
}
{
“类型”:“节点”,
“请求”:“启动”,
“名称”:“专业调试”,
“程序”:“${workspaceRoot}/node_modules/dragrator/bin/dragrator”,
“args”:[“${workspaceRoot}/ConvertedJSFiles/tests/config/conf.js”],
}
像这样试试

注意:如果您正在使用outfolder将生成的ts文件转换为js,请更正路径

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 Program",
            "stopOnEntry": false,
            "program": "${workspaceRoot}/node_modules/protractor/bin/protractor",  // path the protractor node modules.
            "args": [
                "${workspaceRoot}/build/config/config.js" // path to compiled protractor configuration file.
            ],
            "preLaunchTask": null,
            "sourceMaps": true,
            "outFiles": [ "${workspaceRoot}/build/**/*.js" ]
        }
    ]
}
之后,在VisualStudio代码中设置断点并调试程序

如果W3C仍然存在问题,请禁用它

投标人 config.js 注意:根据您的需要调整它这只是如何禁用w3c的示例


谢谢@Infern0!我会后会给你一次机会,让你知道进展如何。