我正在尝试在VS代码上配置LLDB调试器。
我尝试在命令行上使用LLDB,并且工作正常。
这是我运行的命令(这是用C语言编写的)
lldb hello-darwin-EN
run -P filename.name
其中-P是参数,而filename.name是要执行的文件。请注意,这些不是实际名称。
在这些情况下,我不确定如何配置launch.json和task.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": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "/Users/hello-darwin-EN",
"args": ["run","-P","full path to filename.name"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb"
}
]
}
这是task.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "echo Hello"
}
]
}