我正在尝试让在Mac上使用VSCode开发的C代码中的断点正常工作。
我的代码似乎可以编译和运行得很好(顺便提一下,由于'openssl/crypto.h' file not found on vscode),但我无法获得任何断点,甚至无法在启动时使用
我的
我知道VS code在C++调试中忽略断点以及所有类似的讨论。
我的设置是: MacOS Catalina(10.15,生产环境),同时安装了XCode 11.1、Visual Studio Code 1.39.0和C/C++扩展0.26.0-insiders3。
有人比我运气更好吗?
我的代码似乎可以编译和运行得很好(顺便提一下,由于'openssl/crypto.h' file not found on vscode),但我无法获得任何断点,甚至无法在启动时使用
"stopAtEntry": true
或通过连接到运行中的进程来获取。我的
tasks.json
和launch.json
非常标准:{
"tasks": [
{
"type": "shell",
"label": "clang build active file",
"command": "/usr/bin/clang",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-I/usr/local/opt/openssl/include",
"-L/usr/local/opt/openssl/lib",
"-lssl",
"-lcrypto"
],
"options": {
"cwd": "/usr/bin"
}
}
],
"version": "2.0.0"
}
并且:
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "${workspaceFolder}/test2",
"processId": "${command:pickProcess}",
"MIMode": "lldb"
},
{
"name": "clang build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "clang build active file",
"logging": {
"trace": false,
"traceResponse": false,
"engineLogging": false
}
}
]
}
我知道VS code在C++调试中忽略断点以及所有类似的讨论。
我的设置是: MacOS Catalina(10.15,生产环境),同时安装了XCode 11.1、Visual Studio Code 1.39.0和C/C++扩展0.26.0-insiders3。
有人比我运气更好吗?