相关疑难解决方法(0)

如何使用 lldb 在 VS Code 中进行调试?

我正在尝试调试一个简单的 C++ 程序,但没有任何反应,并且断点也不起作用。构建任务运行良好,我可以运行该应用程序。

任务.json

{
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: clang++.exe build active file",
            "command": "F:\\Programs\\LLVM\\bin\\clang++.exe",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "${workspaceFolder}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "Task generated by Debugger."
        }
    ],
    "version": "2.0.0"
}
Run Code Online (Sandbox Code Playgroud)

启动.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "clang++.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": true,
            "cwd": "${workspaceFolder}",
            "environment": …
Run Code Online (Sandbox Code Playgroud)

c++ debugging llvm lldb visual-studio-code

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

c++ ×1

debugging ×1

lldb ×1

llvm ×1

visual-studio-code ×1