vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Make CMake Tools aware of the legacy version of lldb-mi from cpptools
Brief Issue Summary
env: macOS 10.12.6 Xcode 9.2 (9C40b) vs code 1.66.2 ms-vscode.cpptools-1.9.8-darwin-x64 ms-vscode.cmake-tools-1.10.5
It can not debug C++ app.
CMake Tools Diagnostics
{
"os": "darwin",
"vscodeVersion": "1.66.2",
"cmtVersion": "1.10.5",
"configurations": [
{
"folder": "/Users/witton/CMakeTest",
"cmakeVersion": "3.22.1",
"configured": true,
"generator": "Ninja",
"usesPresets": false,
"compilers": {
"C": "/usr/bin/clang",
"CXX": "/usr/bin/clang++"
}
}
],
"cpptoolsIntegration": {
"isReady": true,
"hasCodeModel": true,
"activeBuildType": "Debug",
"buildTypesSeen": [
"Debug"
],
"requests": [
"file:///Users/witton/CMakeTest/main.cpp"
],
"responses": [
{
"uri": "file:///Users/witton/CMakeTest/main.cpp",
"configuration": {
"defines": [],
"standard": "c++14",
"includePath": [],
"compilerPath": "/usr/bin/clang++",
"compilerArgs": [
"-g",
"-O0",
"-Wall",
"-std=c++14"
]
}
}
],
"partialMatches": [],
"targetCount": 1,
"executablesCount": 1,
"librariesCount": 0,
"targets": [
{
"name": "demo",
"type": "EXECUTABLE"
}
]
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": true
}
]
}
Debug Log
[extension] [8366] cmake.debugTarget started
[main] Building folder: CMakeTest demo
[main] Saving open files before configure/build
[build] Starting build
[driver] Start build demo
[proc] Executing command: /usr/local/bin/cmake --build /Users/witton/CMakeTest/build --config Debug --target demo --
[build] ninja: no work to do.
[cmakefileapi-parser] Read reply folder: /Users/witton/CMakeTest/build/.cmake/api/v1/reply
[cmakefileapi-parser] Found index files: ["cache-v2-d0ba8fd5bc2f594b735c.json","codemodel-v2-3c4997f1553d6835a8ef.json","directory-.-Debug-f5ebdc15457944623624.json","index-2022-05-05T14-38-31-0812.json","target-demo-Debug-0a2e5169e4b80ae610d6.json","toolchains-v1-4efbd97b41bf961ec1dc.json"]
[build] Build finished with exit code 0
[cache] Reading CMake cache file /Users/witton/CMakeTest/build/CMakeCache.txt
[cache] Parsing CMake cache string
[cache] Reading CMake cache file /Users/witton/CMakeTest/build/CMakeCache.txt
[cache] Parsing CMake cache string
[proc] Executing command: /usr/bin/lldb-mi --version
[proc] Executing command: /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.9.8-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi --version
[proc] Executing command: /usr/bin/gdb --version
[proc] Executing command: /usr/bin/lldb --version
[proc] Executing command: /usr/bin/lldb --version
[main] Debug configuration from cache: {"type":"cppdbg","name":"Debug demo","request":"launch","cwd":"/Users/witton/CMakeTest/build","args":[],"MIMode":"lldb","miDebuggerPath":"/usr/bin/lldb","program":"/Users/witton/CMakeTest/build/demo"}
[main] Starting debugger with following configuration. {"workspace":"file:///Users/witton/CMakeTest","config":{"type":"cppdbg","name":"Debug demo","request":"launch","cwd":"/Users/witton/CMakeTest/build","args":[],"MIMode":"lldb","miDebuggerPath":"/usr/bin/lldb","program":"/Users/witton/CMakeTest/build/demo","environment":[{"name":"ELECTRON_RUN_AS_NODE","value":"1"},{"name":"TMPDIR","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/"},{"name":"__CF_USER_TEXT_ENCODING","value":"0x1F5:0x19:0x34"},{"name":"SHELL","value":"/bin/bash"},{"name":"HOME","value":"/Users/witton"},{"name":"Apple_PubSub_Socket_Render","value":"/private/tmp/com.apple.launchd.vxo8WaTIAw/Render"},{"name":"SSH_AUTH_SOCK","value":"/private/tmp/com.apple.launchd.UCKTvzSSp6/Listeners"},{"name":"PATH","value":"/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/usr/local/mysql/bin"},{"name":"LOGNAME","value":"witton"},{"name":"XPC_SERVICE_NAME","value":"com.microsoft.VSCode.34496"},{"name":"USER","value":"witton"},{"name":"XPC_FLAGS","value":"0x0"},{"name":"ORIGINAL_XDG_CURRENT_DESKTOP","value":"undefined"},{"name":"VSCODE_CWD","value":"/"},{"name":"VSCODE_NLS_CONFIG","value":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn\",\"_translationsConfigFile\":\"/Users/witton/Library/Application Support/Code/clp/1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/witton/Library/Application Support/Code/clp/1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/witton/Library/Application Support/Code/clp/1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn/dfd34e8260c270da74b5c2d86d61aee4b6d56977\",\"_corruptedFile\":\"/Users/witton/Library/Application Support/Code/clp/1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn/corrupted.info\",\"_languagePackSupport\":true}"},{"name":"VSCODE_CODE_CACHE_PATH","value":"/Users/witton/Library/Application Support/Code/CachedData/dfd34e8260c270da74b5c2d86d61aee4b6d56977"},{"name":"VSCODE_IPC_HOOK","value":"/Users/witton/Library/Application Support/Code/1.66.2-main.sock"},{"name":"VSCODE_PID","value":"10403"},{"name":"MANPATH","value":"/usr/local/share/man:"},{"name":"HOMEBREW_BOTTLE_DOMAIN","value":"https://mirrors.ustc.edu.cn/homebrew-bottles/bottles"},{"name":"CLICOLOR","value":"1"},{"name":"HOMEBREW_REPOSITORY","value":"/usr/local/Homebrew"},{"name":"PYTHONIOENCODING","value":"utf-8"},{"name":"PWD","value":"/"},{"name":"SHLVL","value":"1"},{"name":"HOMEBREW_PREFIX","value":"/usr/local"},{"name":"INFOPATH","value":"/usr/local/share/info:"},{"name":"HOMEBREW_CELLAR","value":"/usr/local/Cellar"},{"name":"_","value":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron"},{"name":"VSCODE_AMD_ENTRYPOINT","value":"vs/workbench/api/node/extensionHostProcess"},{"name":"VSCODE_PIPE_LOGGING","value":"true"},{"name":"VSCODE_VERBOSE_LOGGING","value":"true"},{"name":"VSCODE_LOG_NATIVE","value":"false"},{"name":"VSCODE_IPC_HOOK_EXTHOST","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/vscode-ipc-b8711c85-742a-47a1-878d-e832b33f6483.sock"},{"name":"VSCODE_HANDLES_UNCAUGHT_ERRORS","value":"true"},{"name":"VSCODE_LOG_STACK","value":"false"},{"name":"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL","value":"1"}]},"environment":[{"name":"ELECTRON_RUN_AS_NODE","value":"1"},{"name":"TMPDIR","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/"},{"name":"__CF_USER_TEXT_ENCODING","value":"0x1F5:0x19:0x34"},{"name":"SHELL","value":"/bin/bash"},{"name":"HOME","value":"/Users/witton"},{"name":"Apple_PubSub_Socket_Render","value":"/private/tmp/com.apple.launchd.vxo8WaTIAw/Render"},{"name":"SSH_AUTH_SOCK","value":"/private/tmp/com.apple.launchd.UCKTvzSSp6/Listeners"},{"name":"PATH","value":"/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/usr/local/mysql/bin"},{"name":"LOGNAME","value":"witton"},{"name":"XPC_SERVICE_NAME","value":"com.microsoft.VSCode.34496"},{"name":"USER","value":"witton"},{"name":"XPC_FLAGS","value":"0x0"},{"name":"ORIGINAL_XDG_CURRENT_DESKTOP","value":"undefined"},{"name":"VSCODE_CWD","value":"/"},{"name":"VSCODE_NLS_CONFIG","value":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn\",\"_translationsConfigFile\":\"/Users/witton/Library/Application Support/Code/clp/1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/witton/Library/Application Support/Code/clp/1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/witton/Library/Application Support/Code/clp/1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn/dfd34e8260c270da74b5c2d86d61aee4b6d56977\",\"_corruptedFile\":\"/Users/witton/Library/Application Support/Code/clp/1a7316c624e1dd66d26cf581ee0fb4ca.zh-cn/corrupted.info\",\"_languagePackSupport\":true}"},{"name":"VSCODE_CODE_CACHE_PATH","value":"/Users/witton/Library/Application Support/Code/CachedData/dfd34e8260c270da74b5c2d86d61aee4b6d56977"},{"name":"VSCODE_IPC_HOOK","value":"/Users/witton/Library/Application Support/Code/1.66.2-main.sock"},{"name":"VSCODE_PID","value":"10403"},{"name":"MANPATH","value":"/usr/local/share/man:"},{"name":"HOMEBREW_BOTTLE_DOMAIN","value":"https://mirrors.ustc.edu.cn/homebrew-bottles/bottles"},{"name":"CLICOLOR","value":"1"},{"name":"HOMEBREW_REPOSITORY","value":"/usr/local/Homebrew"},{"name":"PYTHONIOENCODING","value":"utf-8"},{"name":"PWD","value":"/"},{"name":"SHLVL","value":"1"},{"name":"HOMEBREW_PREFIX","value":"/usr/local"},{"name":"INFOPATH","value":"/usr/local/share/info:"},{"name":"HOMEBREW_CELLAR","value":"/usr/local/Cellar"},{"name":"_","value":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron"},{"name":"VSCODE_AMD_ENTRYPOINT","value":"vs/workbench/api/node/extensionHostProcess"},{"name":"VSCODE_PIPE_LOGGING","value":"true"},{"name":"VSCODE_VERBOSE_LOGGING","value":"true"},{"name":"VSCODE_LOG_NATIVE","value":"false"},{"name":"VSCODE_IPC_HOOK_EXTHOST","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/vscode-ipc-b8711c85-742a-47a1-878d-e832b33f6483.sock"},{"name":"VSCODE_HANDLES_UNCAUGHT_ERRORS","value":"true"},{"name":"VSCODE_LOG_STACK","value":"false"},{"name":"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL","value":"1"}]}
[extension] [8366] cmake.debugTarget finished (returned undefined)
Additional Information
When I add in settings.json:
"cmake.debugConfig": {
"MIMode": "lldb",
"miDebuggerPath": "/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.9.8-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi"
},
it report:
Unable to find GDB in default search path and /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.9.8-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi.
set
"miDebuggerPath": "/Applications/Xcode.app/Contents/Developer/usr/bin/lldb-mi"
or set
"MIMode": "gdb", "miDebuggerPath": "/usr/local/bin/gdb"
it does not take effect.
This could be related to #2509 which was recently fixed. Could you install the pre-release version of CMake Tools (you can do it from the extensions panel) and see if that fixes your problem? And as a bonus, you shouldn't need to set a hard-coded path to the cpptools version of lldb-mi
. We should find it for you. The following should be enough:
cmake.debugConfig: {
"MIMode": "lldb"
}
I install the pre-release version of CMake Tools(v1.11.15) and set:
cmake.debugConfig: {
"MIMode": "lldb"
}
still can not debug.
I install the pre-release version of c/c++(v1.10.0) at the same time, still can not debug.
the CMake/Build
output is:
[main] Building folder: CMakeTest demo
[build] Starting build
[proc] Executing command: /usr/local/bin/cmake --build /Users/witton/CMakeTest/build --config Debug --target demo --
[build] ninja: no work to do.
[build] Build finished with exit code 0
[proc] Executing command: /usr/bin/lldb-mi --version
[proc] Executing command: /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi --version
[proc] Executing command: /usr/bin/gdb --version
[proc] Executing command: /usr/bin/lldb --version
[proc] Executing command: /usr/bin/lldb --version
Hmm... That's unexpected. What happens when you run:
/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi --version
echo $?
in your terminal?
Hmm... That's unexpected. What happens when you run:
/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi --version echo $?
in your terminal?
nothing
I found using ms-vscode.cpptools-1.5.1 and set
"cmake.debugConfig": {
"MIMode": "lldb",
"miDebuggerPath": "/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.5.1/debugAdapters/lldb/bin/lldb-mi"
}
it does work. This version need to set "miDebuggerPath". But it does not work above version 1.5.1 of ms-vscode.cpptools.
nothing
What? At the very least, echo $?
should print a number. What does it print when you pass --version
to the lldb-mi from 1.5.1?
This is ms-vscode.cpptools-1.5.1 output:

But above 1.5.1 version, the second pic(debug console
window) output nothing.
the output
windows is like this:
[main] Building folder: CMakeTest demo
[build] Starting build
[proc] Executing command: /usr/local/bin/cmake --build /Users/witton/CMakeTest/build --config Debug --target demo --
[build] ninja: no work to do.
[build] Build finished with exit code 0
[proc] Executing command: /usr/bin/lldb-mi --version
[proc] Executing command: /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi --version
[proc] Executing command: /usr/bin/gdb --version
[proc] Executing command: /usr/bin/lldb --version
[proc] Executing command: /usr/bin/lldb --version
terminal
input echo $?
output 0
I was asking if you could run those commands in your terminal.
Hmm... That's unexpected. What happens when you run:
/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi --version echo $?
in your terminal?
nothing
sorry, I don't understand before. echo $? output 137
Ok. That's why it doesn't work. It should output 0
. @WardenGnaw, any idea why the lldb-mi packaged with cpptools is returning error codes when run with --version
? Is that not a supported flag anymore?
$ /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi --version
Version: GNU gdb (GDB) 7.4
(This is a MI stub on top of LLDB and not GDB)
All rights reserved.
dyld: lazy symbol binding failed: Symbol not found: __ZN4lldb10SBDebugger14GetDummyTargetEv
Referenced from: /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi
Expected in: /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB
dyld: Symbol not found: __ZN4lldb10SBDebugger14GetDummyTargetEv
Referenced from: /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb-mi/bin/lldb-mi
Expected in: /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB
Killed: 9
$ echo $?
137
Thanks @WittonBell that's helpful. I think the problem is that you have an older version of macOS (Sierra, I believe based on the version you posted earlier). Unfortunately, this version has fallen out of support due to its age. Are you able to upgrade your OS to a newer version?
For older platforms for High Sierra and lower, there should be an lldb-mi
under lldb\bin\lldb-mi
that should work.
That version of lldb-mi
under lldb
was built against lldb 6.x, the one under the lldb-mi
folder was built against 11.x
Thanks @WardenGnaw, I forgot there was another version. We can make CMake Tools aware of that one too.
Thanks @bobbrow @WardenGnaw .
I set another lldb lldb/bin/lldb-mi
:
"cmake.debugConfig": {
"MIMode": "lldb",
"miDebuggerPath": "/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi"
},
still does not work, maybe cmake tools
not support.
Can you run those commands again for this other path?
/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi --version
echo $?
Maybe it will show that this binary doesn't work on Sierra either.
$ /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi --version
Version: GNU gdb (GDB) 7.4
(This is a MI stub on top of LLDB and not GDB)
All rights reserved.
$ echo $?
0
And you still have version 1.11.x of CMake Tools installed? I don't understand how it could skip the override logic for this version because the return code is 0
(success). Can you share the logs again so I can see if it's testing the path?
I test debug a single cpp file with launch.json
and set miDebuggerPath
is /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi
, still does not work.
I think debugAdapters is something wrong for older platforms(High Sierra and lower). @WardenGnaw
And you still have version 1.11.x of CMake Tools installed? I don't understand how it could skip the override logic for this version because the return code is
0
(success). Can you share the logs again so I can see if it's testing the path?
cmake version is 3.22.1
[extension] [5882] cmake.debugTarget started
[main] Building folder: CMakeTest demo
[main] Saving open files before configure/build
[build] Starting build
[driver] Start build demo
[proc] Executing command: /usr/local/bin/cmake --build /Users/witton/CMakeTest/build --config Debug --target demo --
[build] ninja: no work to do.
[cmakefileapi-parser] Read reply folder: /Users/witton/CMakeTest/build/.cmake/api/v1/reply
[cmakefileapi-parser] Found index files: ["cache-v2-dc1ba2ef5ed17d4ab1ae.json","codemodel-v2-3c4997f1553d6835a8ef.json","directory-.-Debug-f5ebdc15457944623624.json","index-2022-05-06T23-44-35-0762.json","target-demo-Debug-0a2e5169e4b80ae610d6.json","toolchains-v1-4efbd97b41bf961ec1dc.json"]
[cache] Reading CMake cache file /Users/witton/CMakeTest/build/CMakeCache.txt
[cache] Parsing CMake cache string
[build] Build finished with exit code 0
[cache] Reading CMake cache file /Users/witton/CMakeTest/build/CMakeCache.txt
[cache] Parsing CMake cache string
[proc] Executing command: /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi --version
[main] Debug configuration from cache: {"type":"cppdbg","name":"Debug demo","request":"launch","cwd":"/Users/witton/CMakeTest/build","args":[],"MIMode":"lldb","miDebuggerPath":"/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi","program":"/Users/witton/CMakeTest/build/demo"}
[main] Starting debugger with following configuration. {"workspace":"file:///Users/witton/CMakeTest","config":{"type":"cppdbg","name":"Debug demo","request":"launch","cwd":"/Users/witton/CMakeTest/build","args":[],"MIMode":"lldb","miDebuggerPath":"/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi","program":"/Users/witton/CMakeTest/build/demo","environment":[{"name":"ELECTRON_RUN_AS_NODE","value":"1"},{"name":"TMPDIR","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/"},{"name":"__CF_USER_TEXT_ENCODING","value":"0x1F5:0x19:0x34"},{"name":"SHELL","value":"/bin/bash"},{"name":"HOME","value":"/Users/witton"},{"name":"Apple_PubSub_Socket_Render","value":"/private/tmp/com.apple.launchd.vxo8WaTIAw/Render"},{"name":"SSH_AUTH_SOCK","value":"/private/tmp/com.apple.launchd.UCKTvzSSp6/Listeners"},{"name":"PATH","value":"/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/usr/local/mysql/bin"},{"name":"LOGNAME","value":"witton"},{"name":"XPC_SERVICE_NAME","value":"com.microsoft.VSCode.34520"},{"name":"USER","value":"witton"},{"name":"XPC_FLAGS","value":"0x0"},{"name":"ORIGINAL_XDG_CURRENT_DESKTOP","value":"undefined"},{"name":"VSCODE_CWD","value":"/"},{"name":"VSCODE_NLS_CONFIG","value":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"a78078f10f99ab7adc9063c14c25e7ae.zh-cn\",\"_translationsConfigFile\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/57fd6d0195bb9b9d1b49f6da5db789060795de47\",\"_corruptedFile\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/corrupted.info\",\"_languagePackSupport\":true}"},{"name":"VSCODE_CODE_CACHE_PATH","value":"/Users/witton/Library/Application Support/Code/CachedData/57fd6d0195bb9b9d1b49f6da5db789060795de47"},{"name":"VSCODE_IPC_HOOK","value":"/Users/witton/Library/Application Support/Code/1.67.0-main.sock"},{"name":"VSCODE_PID","value":"16425"},{"name":"MANPATH","value":"/usr/local/share/man:"},{"name":"HOMEBREW_BOTTLE_DOMAIN","value":"https://mirrors.ustc.edu.cn/homebrew-bottles/bottles"},{"name":"CLICOLOR","value":"1"},{"name":"HOMEBREW_REPOSITORY","value":"/usr/local/Homebrew"},{"name":"PYTHONIOENCODING","value":"utf-8"},{"name":"PWD","value":"/"},{"name":"SHLVL","value":"1"},{"name":"HOMEBREW_PREFIX","value":"/usr/local"},{"name":"INFOPATH","value":"/usr/local/share/info:"},{"name":"HOMEBREW_CELLAR","value":"/usr/local/Cellar"},{"name":"_","value":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron"},{"name":"VSCODE_AMD_ENTRYPOINT","value":"vs/workbench/api/node/extensionHostProcess"},{"name":"VSCODE_PIPE_LOGGING","value":"true"},{"name":"VSCODE_VERBOSE_LOGGING","value":"true"},{"name":"VSCODE_LOG_NATIVE","value":"false"},{"name":"VSCODE_IPC_HOOK_EXTHOST","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/vscode-ipc-8589219f-ac62-4a5c-b32f-476230a0e7e5.sock"},{"name":"VSCODE_HANDLES_UNCAUGHT_ERRORS","value":"true"},{"name":"VSCODE_LOG_STACK","value":"false"},{"name":"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL","value":"1"}]},"environment":[{"name":"ELECTRON_RUN_AS_NODE","value":"1"},{"name":"TMPDIR","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/"},{"name":"__CF_USER_TEXT_ENCODING","value":"0x1F5:0x19:0x34"},{"name":"SHELL","value":"/bin/bash"},{"name":"HOME","value":"/Users/witton"},{"name":"Apple_PubSub_Socket_Render","value":"/private/tmp/com.apple.launchd.vxo8WaTIAw/Render"},{"name":"SSH_AUTH_SOCK","value":"/private/tmp/com.apple.launchd.UCKTvzSSp6/Listeners"},{"name":"PATH","value":"/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/usr/local/mysql/bin"},{"name":"LOGNAME","value":"witton"},{"name":"XPC_SERVICE_NAME","value":"com.microsoft.VSCode.34520"},{"name":"USER","value":"witton"},{"name":"XPC_FLAGS","value":"0x0"},{"name":"ORIGINAL_XDG_CURRENT_DESKTOP","value":"undefined"},{"name":"VSCODE_CWD","value":"/"},{"name":"VSCODE_NLS_CONFIG","value":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"a78078f10f99ab7adc9063c14c25e7ae.zh-cn\",\"_translationsConfigFile\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/57fd6d0195bb9b9d1b49f6da5db789060795de47\",\"_corruptedFile\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/corrupted.info\",\"_languagePackSupport\":true}"},{"name":"VSCODE_CODE_CACHE_PATH","value":"/Users/witton/Library/Application Support/Code/CachedData/57fd6d0195bb9b9d1b49f6da5db789060795de47"},{"name":"VSCODE_IPC_HOOK","value":"/Users/witton/Library/Application Support/Code/1.67.0-main.sock"},{"name":"VSCODE_PID","value":"16425"},{"name":"MANPATH","value":"/usr/local/share/man:"},{"name":"HOMEBREW_BOTTLE_DOMAIN","value":"https://mirrors.ustc.edu.cn/homebrew-bottles/bottles"},{"name":"CLICOLOR","value":"1"},{"name":"HOMEBREW_REPOSITORY","value":"/usr/local/Homebrew"},{"name":"PYTHONIOENCODING","value":"utf-8"},{"name":"PWD","value":"/"},{"name":"SHLVL","value":"1"},{"name":"HOMEBREW_PREFIX","value":"/usr/local"},{"name":"INFOPATH","value":"/usr/local/share/info:"},{"name":"HOMEBREW_CELLAR","value":"/usr/local/Cellar"},{"name":"_","value":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron"},{"name":"VSCODE_AMD_ENTRYPOINT","value":"vs/workbench/api/node/extensionHostProcess"},{"name":"VSCODE_PIPE_LOGGING","value":"true"},{"name":"VSCODE_VERBOSE_LOGGING","value":"true"},{"name":"VSCODE_LOG_NATIVE","value":"false"},{"name":"VSCODE_IPC_HOOK_EXTHOST","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/vscode-ipc-8589219f-ac62-4a5c-b32f-476230a0e7e5.sock"},{"name":"VSCODE_HANDLES_UNCAUGHT_ERRORS","value":"true"},{"name":"VSCODE_LOG_STACK","value":"false"},{"name":"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL","value":"1"}]}
[extension] [5882] cmake.debugTarget finished (returned undefined)
Thanks. This confirms that CMake Tools is doing the right thing, but the debugger packaged with cpptools is failing.
cmake tools
version is v1.11.16
[extension] [8190] cmake.debugTarget started
[main] Building folder: CMakeTest demo
[main] Saving open files before configure/build
[build] Starting build
[driver] Start build demo
[proc] Executing command: /usr/local/bin/cmake --build /Users/witton/CMakeTest/build --config Debug --target demo --
[build] ninja: no work to do.
[cmakefileapi-parser] Read reply folder: /Users/witton/CMakeTest/build/.cmake/api/v1/reply
[cmakefileapi-parser] Found index files: ["cache-v2-dc1ba2ef5ed17d4ab1ae.json","codemodel-v2-3c4997f1553d6835a8ef.json","directory-.-Debug-f5ebdc15457944623624.json","index-2022-05-07T00-01-24-0369.json","target-demo-Debug-0a2e5169e4b80ae610d6.json","toolchains-v1-4efbd97b41bf961ec1dc.json"]
[build] Build finished with exit code 0
[cache] Reading CMake cache file /Users/witton/CMakeTest/build/CMakeCache.txt
[cache] Parsing CMake cache string
[cache] Reading CMake cache file /Users/witton/CMakeTest/build/CMakeCache.txt
[cache] Parsing CMake cache string
[proc] Executing command: /Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi --version
[main] Debug configuration from cache: {"type":"cppdbg","name":"Debug demo","request":"launch","cwd":"/Users/witton/CMakeTest/build","args":[],"MIMode":"lldb","miDebuggerPath":"/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi","program":"/Users/witton/CMakeTest/build/demo"}
[main] Starting debugger with following configuration. {"workspace":"file:///Users/witton/CMakeTest","config":{"type":"cppdbg","name":"Debug demo","request":"launch","cwd":"/Users/witton/CMakeTest/build","args":[],"MIMode":"lldb","miDebuggerPath":"/Users/witton/.vscode/extensions/ms-vscode.cpptools-1.10.0-darwin-x64/debugAdapters/lldb/bin/lldb-mi","program":"/Users/witton/CMakeTest/build/demo","environment":[{"name":"ELECTRON_RUN_AS_NODE","value":"1"},{"name":"TMPDIR","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/"},{"name":"__CF_USER_TEXT_ENCODING","value":"0x1F5:0x19:0x34"},{"name":"SHELL","value":"/bin/bash"},{"name":"HOME","value":"/Users/witton"},{"name":"Apple_PubSub_Socket_Render","value":"/private/tmp/com.apple.launchd.vxo8WaTIAw/Render"},{"name":"SSH_AUTH_SOCK","value":"/private/tmp/com.apple.launchd.UCKTvzSSp6/Listeners"},{"name":"PATH","value":"/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/usr/local/mysql/bin"},{"name":"LOGNAME","value":"witton"},{"name":"XPC_SERVICE_NAME","value":"com.microsoft.VSCode.34520"},{"name":"USER","value":"witton"},{"name":"XPC_FLAGS","value":"0x0"},{"name":"ORIGINAL_XDG_CURRENT_DESKTOP","value":"undefined"},{"name":"VSCODE_CWD","value":"/"},{"name":"VSCODE_NLS_CONFIG","value":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"a78078f10f99ab7adc9063c14c25e7ae.zh-cn\",\"_translationsConfigFile\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/57fd6d0195bb9b9d1b49f6da5db789060795de47\",\"_corruptedFile\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/corrupted.info\",\"_languagePackSupport\":true}"},{"name":"VSCODE_CODE_CACHE_PATH","value":"/Users/witton/Library/Application Support/Code/CachedData/57fd6d0195bb9b9d1b49f6da5db789060795de47"},{"name":"VSCODE_IPC_HOOK","value":"/Users/witton/Library/Application Support/Code/1.67.0-main.sock"},{"name":"VSCODE_PID","value":"16425"},{"name":"MANPATH","value":"/usr/local/share/man:"},{"name":"HOMEBREW_BOTTLE_DOMAIN","value":"https://mirrors.ustc.edu.cn/homebrew-bottles/bottles"},{"name":"CLICOLOR","value":"1"},{"name":"HOMEBREW_REPOSITORY","value":"/usr/local/Homebrew"},{"name":"PYTHONIOENCODING","value":"utf-8"},{"name":"PWD","value":"/"},{"name":"SHLVL","value":"1"},{"name":"HOMEBREW_PREFIX","value":"/usr/local"},{"name":"INFOPATH","value":"/usr/local/share/info:"},{"name":"HOMEBREW_CELLAR","value":"/usr/local/Cellar"},{"name":"_","value":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron"},{"name":"VSCODE_AMD_ENTRYPOINT","value":"vs/workbench/api/node/extensionHostProcess"},{"name":"VSCODE_PIPE_LOGGING","value":"true"},{"name":"VSCODE_VERBOSE_LOGGING","value":"true"},{"name":"VSCODE_LOG_NATIVE","value":"false"},{"name":"VSCODE_IPC_HOOK_EXTHOST","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/vscode-ipc-e0e48c25-7783-4f6b-9a93-8451b85e5299.sock"},{"name":"VSCODE_HANDLES_UNCAUGHT_ERRORS","value":"true"},{"name":"VSCODE_LOG_STACK","value":"false"},{"name":"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL","value":"1"}]},"environment":[{"name":"ELECTRON_RUN_AS_NODE","value":"1"},{"name":"TMPDIR","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/"},{"name":"__CF_USER_TEXT_ENCODING","value":"0x1F5:0x19:0x34"},{"name":"SHELL","value":"/bin/bash"},{"name":"HOME","value":"/Users/witton"},{"name":"Apple_PubSub_Socket_Render","value":"/private/tmp/com.apple.launchd.vxo8WaTIAw/Render"},{"name":"SSH_AUTH_SOCK","value":"/private/tmp/com.apple.launchd.UCKTvzSSp6/Listeners"},{"name":"PATH","value":"/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/usr/local/mysql/bin"},{"name":"LOGNAME","value":"witton"},{"name":"XPC_SERVICE_NAME","value":"com.microsoft.VSCode.34520"},{"name":"USER","value":"witton"},{"name":"XPC_FLAGS","value":"0x0"},{"name":"ORIGINAL_XDG_CURRENT_DESKTOP","value":"undefined"},{"name":"VSCODE_CWD","value":"/"},{"name":"VSCODE_NLS_CONFIG","value":"{\"locale\":\"zh-cn\",\"availableLanguages\":{\"*\":\"zh-cn\"},\"_languagePackId\":\"a78078f10f99ab7adc9063c14c25e7ae.zh-cn\",\"_translationsConfigFile\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/tcf.json\",\"_cacheRoot\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn\",\"_resolvedLanguagePackCoreLocation\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/57fd6d0195bb9b9d1b49f6da5db789060795de47\",\"_corruptedFile\":\"/Users/witton/Library/Application Support/Code/clp/a78078f10f99ab7adc9063c14c25e7ae.zh-cn/corrupted.info\",\"_languagePackSupport\":true}"},{"name":"VSCODE_CODE_CACHE_PATH","value":"/Users/witton/Library/Application Support/Code/CachedData/57fd6d0195bb9b9d1b49f6da5db789060795de47"},{"name":"VSCODE_IPC_HOOK","value":"/Users/witton/Library/Application Support/Code/1.67.0-main.sock"},{"name":"VSCODE_PID","value":"16425"},{"name":"MANPATH","value":"/usr/local/share/man:"},{"name":"HOMEBREW_BOTTLE_DOMAIN","value":"https://mirrors.ustc.edu.cn/homebrew-bottles/bottles"},{"name":"CLICOLOR","value":"1"},{"name":"HOMEBREW_REPOSITORY","value":"/usr/local/Homebrew"},{"name":"PYTHONIOENCODING","value":"utf-8"},{"name":"PWD","value":"/"},{"name":"SHLVL","value":"1"},{"name":"HOMEBREW_PREFIX","value":"/usr/local"},{"name":"INFOPATH","value":"/usr/local/share/info:"},{"name":"HOMEBREW_CELLAR","value":"/usr/local/Cellar"},{"name":"_","value":"/Applications/Visual Studio Code.app/Contents/MacOS/Electron"},{"name":"VSCODE_AMD_ENTRYPOINT","value":"vs/workbench/api/node/extensionHostProcess"},{"name":"VSCODE_PIPE_LOGGING","value":"true"},{"name":"VSCODE_VERBOSE_LOGGING","value":"true"},{"name":"VSCODE_LOG_NATIVE","value":"false"},{"name":"VSCODE_IPC_HOOK_EXTHOST","value":"/var/folders/my/pxc3drzx37d95dp6dmkd7y2h0000gn/T/vscode-ipc-e0e48c25-7783-4f6b-9a93-8451b85e5299.sock"},{"name":"VSCODE_HANDLES_UNCAUGHT_ERRORS","value":"true"},{"name":"VSCODE_LOG_STACK","value":"false"},{"name":"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL","value":"1"}]}
[extension] [8190] cmake.debugTarget finished (returned undefined)