在vscode / windows下调试clanglldb

问题描述

我正在尝试调试 helloworld 项目

#include <stdio.h>

int
main (void)
{
  printf ("Hello,world!\n");
  return 0;
}
使用 clang 构建的

。我使用vs代码执行这些操作。这是我的task.json文件

{
    "version": "2.0.0","tasks": [
        {
            "type": "shell","label": "C/C++: clang.exe build active file","command": "C:\\msys64\\mingw64\\bin\\clang.exe","args": [
                "-g","${file}","-o","${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],"options": {
                "cwd": "${workspaceFolder}"
            },"problemmatcher": [
                "$gcc"
            ],"group": "build"
        }
    ]
}

作为构建任务,它可以工作,但是随后使用launch.json进行调试似乎没有任何进展。这是我的 launch.json`文件

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more @R_83_4045@ion,visit: https://go.microsoft.com/fwlink/?linkid=830387
    "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": [],"externalConsole": false,"MIMode": "lldb","miDebuggerPath": "C:\\msys64\\mingw64\\bin\\lldb.exe","setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb","text": "-enable-pretty-printing","ignoreFailures": true
                }
            ],"prelaunchTask": "C/C++: clang.exe build active file"
        }
    ]
}

如何使用clang / lldb在vs代码下设置调试器?

在此命令中停顿了

PS C:\c_helloworld>  & 'c:\.vscode\extensions\ms-vscode.cpptools-0.30.0-insiders5\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-2oaooq4b.u01' '--stdout=Microsoft-MIEngine-Out-ojuis1aj.kfb' '--stderr=Microsoft-MIEngine-Error-tcxqgdhj.tgp' '--pid=Microsoft-MIEngine-Pid-nam4qmgr.r4y' '--dbgExe=C:\msys64\mingw64\bin\lldb.exe' '--interpreter=mi'

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)