如何设置启动配置以使用 rust-analyzer 在 VSCode 中调试 Rust 单元测试?

时间:2021-02-18 07:49:35

标签: visual-studio-code rust lldb vscode-debugger

我正在尝试使用 VSCode 来调试 Rust 单元测试。

到目前为止,我已经安装了 Rust 分析器,以及 CodeLLDB,它似乎是调试器所需的依赖项。

当我尝试调试测试时,通过按下单元测试上方的“调试”代码镜头,我收到消息:

process exited with status -1

还有一个链接可以带我到 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": "pwa-chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://localhost:8080",
            "webRoot": "${workspaceFolder}"
        },
    ]
}

我想这必须为 LLDB 配置才能附加到测试过程?但我不知道应该放什么在这里才能达到预期的效果。

0 个答案:

没有答案