【问题标题】:How to debug Webdriverio cucumber framework in VScode如何在VScode中调试Webdriverio黄瓜框架
【发布时间】:2021-09-27 23:00:58
【问题描述】:

我正在尝试在 Visual Studio 代码中调试 Cucumber 场景,下面是 launch.json 配置。执行不会在断点处停止。我不确定我提到的通用功能路径是否正确。我的 launch.json 需要更改吗?我已经从类似的堆栈溢出帖子中更新了 Outfiles 名称值对。

{
            "name": "WebdriverIO Test",
            "type": "node",
            "request": "launch",
            "args": ["wdio.conf.js", "--spec", "${file}","${workspaceRoot}/test/features/**/*.feature","--tags",
                "${workspaceRoot}/test/stepdefinition/**/*"],
            "cwd": "${workspaceFolder}",
            "autoAttachChildProcesses": true,
            "program": "${workspaceRoot}/node_modules/cucumber/bin/cucumber-js",
            "outFiles": [
                "${workspaceRoot}/test/features/**/*.feature"
            ],
            "console": "integratedTerminal",
            "skipFiles": [
                "${workspaceFolder}/node_modules/**/*.js",
                "${workspaceFolder}/lib/**/*.js",
                "<node_internals>/**/*.js"
            ]
        },

下面是文件夹结构的截图

【问题讨论】:

    标签: javascript visual-studio-code cucumber visual-studio-debugging javascript-debugger


    【解决方案1】:

    我只是在 VSCode 中使用 Javascript Debug Terminal 来调试我的 webdriverio-cucumber 测试。它非常简单,通常不需要额外的配置步骤。到目前为止,我发现它非常方便和有用。你会发现更多信息here。希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2016-10-14
      • 1970-01-01
      • 2021-12-07
      • 1970-01-01
      • 1970-01-01
      • 2022-01-18
      • 1970-01-01
      • 1970-01-01
      • 2018-06-27
      相关资源
      最近更新 更多