如何解决在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 information,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 举报,一经查实,本站将立刻删除。