Codelldb cannot start debugging normally
OS:Windows10-19044.2728 VSCODE:1.77 CodeLLDB version: 1.9.0 Compiler: msvc Debuggee:msvc abi,x64,Debug,v140
When I use vscode or vimspector to debug a program, configure type: lldb and press F5 to remain in the startup state. I found the log of lldb and found that it is still starting. I have seen that codelldb has been running and the CPU usage rate is 8, I don't know what codelldb is doing at this time. I see that the top level function of the thread stack has always been ucrtbase.dll! configthreadlocale+0x50 At this point, the LOG remains displayed in the line "winapi:: um:: wincon:: AttachConsole (pid)=1". It took a few minutes for my program to start. I wrote a demo applet that quickly started debugging normally. If the vimspector starts for a long time, it will report a lauch failed timeout error and cannot be debugged. I have contacted the author of vimspector, He confirmed that this is not a problem with vimspector, and that this can also happen when I use vscode, but using vscode, I can configure type: cppvsdbg to debug normally.
Verbose log
Initial debug configuration: {
name: '(Windows) launch',
type: 'lldb',
request: 'launch',
program: '${workspaceFolder}/build/bin/st.exe',
args: [],
cwd: '${workspaceFolder}',
__configurationTarget: 6
}
Resolved debug configuration: {
name: '(Windows) launch',
type: 'lldb',
request: 'launch',
program: '${workspaceFolder}/build/bin/st.exe',
args: [],
cwd: '${workspaceFolder}',
__configurationTarget: 6,
relativePathBase: 'k:\\ws_others\\11\\hummer',
_adapterSettings: {
displayFormat: 'auto',
showDisassembly: 'auto',
dereferencePointers: true,
suppressMissingSourceFiles: true,
evaluationTimeout: 0,
consoleMode: 'commands',
sourceLanguages: null,
terminalPromptClear: null,
evaluateForHovers: true,
commandCompletions: true,
reproducer: false
}
}
liblldb: c:\Users\1\.vscode\extensions\vadimcn.vscode-lldb-1.9.0\lldb\bin\liblldb.dll
environment: {}
settings: { evaluateForHovers: true, commandCompletions: true }
[DEBUG codelldb] Connecting to 127.0.0.1:65260
[DEBUG codelldb] New debug session
[DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true},"type":"request","seq":1}
[DEBUG codelldb::dap_codec] {"command":"launch","arguments":{"name":"(Windows) launch","type":"lldb","request":"launch","program":"K:\\ws_others\\11\\hummer/build/bin/st.exe","args":[],"cwd":"K:\\ws_others\\11\\hummer","__configurationTarget":6,"relativePathBase":"k:\\ws_others\\11\\hummer","_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":0,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":null,"evaluateForHovers":true,"commandCompletions":true,"reproducer":false},"__sessionId":"487b9851-7fba-4bd1-9ba0-cf1bc048c2f7"},"type":"request","seq":2}
[DEBUG codelldb::dap_codec] {"command":"setBreakpoints","arguments":{"source":{"name":"market_yanpan_web_panel.cpp","path":"k:\\ws_others\\11\\hummer\\src\\upapp\\app\\main\\main_panel\\market_panel\\market_yanpan_web_panel.cpp"},"lines":[38],"breakpoints":[{"line":38}],"sourceModified":false},"type":"request","seq":3}
[DEBUG codelldb::dap_codec] --> {"command":"setBreakpoints","arguments":{"source":{"name":"smt_setting_mgr_imp.cpp","path":"k:\\ws_others\\11\\xplugins\\src\\setting\\smt_setting_mgr_imp.cpp"},"lines":[42],"breakpoints":[{"line":42}],"sourceModified":false},"type":"request","seq":4}
[DEBUG codelldb::dap_codec] --> {"command":"setBreakpoints","arguments":{"source":{"name":"xtrade_manager.cpp","path":"k:\\ws_others\\11\\xplugins\\src\\libxtrade\\xtrade_manager.cpp"},"lines":[278],"breakpoints":[{"line":278}],"sourceModified":false},"type":"request","seq":5}
[DEBUG codelldb::dap_codec] --> {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":6}
[DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":7}
[DEBUG codelldb::dap_codec] --> {"command":"setInstructionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":8}
[DEBUG codelldb::dap_codec] --> {"command":"setExceptionBreakpoints","arguments":{"filters":["cpp_throw"]},"type":"request","seq":9}
[DEBUG codelldb::dap_codec] --> {"type":"response","seq":10,"command":"runInTerminal","request_seq":5,"success":true,"body":{"shellProcessId":10724}}
error: st.exe :: Class 'DuiLib::CRichEditUI' has a base class 'DuiLib::CContainerUI' which does not have a complete definition.
error: st.exe :: Class 'tagARRAYDESC' has a member 'tdescElem' of type 'tagTYPEDESC' which does not have a complete definition.
error: st.exe :: Class 'tagPARAMDESCEX' has a member 'varDefaultValue' of type 'tagVARIANT' which does not have a complete definition.
[DEBUG codelldb::dap_codec] {"command":"configurationDone","type":"request","seq":11}
[DEBUG codelldb::dap_codec] x86_64-windows-msvc, PDB
Similar errors:
Class ... has a member ... of type ... which does not have a complete definition
Verbose log
Initial debug configuration: {
type: 'lldb',
request: 'launch',
name: 'Debug',
program: '${workspaceFolder}/build/bin/Stable Diffusion Editor.exe',
cwd: '${workspaceFolder}',
__configurationTarget: 6
}
Resolved debug configuration: {
type: 'lldb',
request: 'launch',
name: 'Debug',
program: '${workspaceFolder}/build/bin/Stable Diffusion Editor.exe',
cwd: '${workspaceFolder}',
__configurationTarget: 6,
relativePathBase: 'd:\\Projects\\cpp\\node_diffusion',
_adapterSettings: {
displayFormat: 'auto',
showDisassembly: 'auto',
dereferencePointers: true,
suppressMissingSourceFiles: true,
evaluationTimeout: 5,
consoleMode: 'commands',
sourceLanguages: null,
terminalPromptClear: null,
evaluateForHovers: true,
commandCompletions: true,
reproducer: false
}
}
liblldb: c:\Users\Giorgio\.vscode\extensions\vadimcn.vscode-lldb-1.9.0\lldb\bin\liblldb.dll
environment: {}
settings: { evaluateForHovers: true, commandCompletions: true }
[DEBUG codelldb] Connecting to 127.0.0.1:53768
[DEBUG codelldb] New debug session
[DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true},"type":"request","seq":1}
[DEBUG codelldb::dap_codec] <-- {"seq":1,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"exceptionBreakpointFilters":[{"default":true,"filter":"cpp_throw","label":"C++: on throw"},{"default":false,"filter":"cpp_catch","label":"C++: on catch"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true,"supportsSteppingGranularity":true,"supportsWriteMemoryRequest":true}}
[DEBUG codelldb::dap_codec] --> {"command":"launch","arguments":{"type":"lldb","request":"launch","name":"Debug","program":"D:\\Projects\\cpp\\node_diffusion/build/bin/Stable Diffusion Editor.exe","cwd":"D:\\Projects\\cpp\\node_diffusion","__configurationTarget":6,"relativePathBase":"d:\\Projects\\cpp\\node_diffusion","_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":5,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":null,"evaluateForHovers":true,"commandCompletions":true,"reproducer":false},"__sessionId":"5e8780bc-5b61-4f1b-beec-327a31df3357"},"type":"request","seq":2}
[DEBUG codelldb::dap_codec] <-- {"seq":2,"type":"event","event":"output","body":{"output":"Console is in 'commands' mode, prefix expressions with '?'.\n"}}
INFO(Python) 09:57:27 formatters: Initializing
INFO(Python) 09:57:27 formatters.rust: Initializing
[DEBUG codelldb::dap_codec] <-- {"seq":3,"type":"event","event":"initialized"}
[DEBUG codelldb::debug_session] Debug event: 0000020888CDE1E0 Event: broadcaster = 000002088744A020 (lldb.target), type = 0x00000002 (modules-loaded), data = {Stable Diffusion Editor.exe}
[DEBUG codelldb::dap_codec] <-- {"seq":4,"type":"event","event":"module","body":{"module":{"addressRange":"FFFFFFFFFFFFFFFF","id":"FFFFFFFFFFFFFFFF","name":"Stable Diffusion Editor.exe","path":"D:\\Projects\\cpp\\node_diffusion\\build\\bin\\Stable Diffusion Editor.exe","symbolFilePath":"D:\\Projects\\cpp\\node_diffusion\\build\\bin\\Stable Diffusion Editor.exe","symbolStatus":"Symbols loaded."},"reason":"new"}}
[DEBUG codelldb::dap_codec] <-- {"seq":5,"type":"request","command":"runInTerminal","arguments":{"args":["c:\\Users\\Giorgio\\.vscode\\extensions\\vadimcn.vscode-lldb-1.9.0\\adapter\\codelldb.exe","terminal-agent","--connect=53770"],"cwd":"","kind":"integrated","title":"Debug"}}
[DEBUG codelldb::dap_codec] --> {"command":"setBreakpoints","arguments":{"source":{"name":"application.h","path":"d:\\Projects\\cpp\\node_diffusion\\include\\application.h"},"lines":[193],"breakpoints":[{"line":193}],"sourceModified":false},"type":"request","seq":3}
[DEBUG codelldb::dap_codec] --> {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4}
[DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":5}
[DEBUG codelldb::dap_codec] --> {"command":"setInstructionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":6}
[DEBUG codelldb::dap_codec] --> {"command":"setExceptionBreakpoints","arguments":{"filters":["cpp_throw"]},"type":"request","seq":7}
[DEBUG codelldb::dap_codec] --> {"type":"response","seq":8,"command":"runInTerminal","request_seq":5,"success":true,"body":{"shellProcessId":19608}}
error: Stable Diffusion Editor.exe :: Class 'std::strong_ordering' has a member 'less' of type 'std::strong_ordering' which does not have a complete definition.
error: Stable Diffusion Editor.exe :: Class 'std::partial_ordering' has a member 'less' of type 'std::partial_ordering' which does not have a complete definition.
error: Stable Diffusion Editor.exe :: Class 'std::weak_ordering' has a member 'less' of type 'std::weak_ordering' which does not have a complete definition.
Debug adapter exit code=3221225477 (0xc0000005), signal=null.
Same.
Please review this: https://github.com/vadimcn/codelldb/wiki/Breakpoints-are-not-getting-hit
Have the same problem on CodeLLDB 1.10.0, compiling C++20 program with clang 17.0.6 - adapter crashes on debug launch. The error is the same as above:
error: program.exe :: Class 'std::strong_ordering' has a member 'less' of type 'std::strong_ordering' which does not have a complete definition.
error: program.exe :: Class 'std::partial_ordering' has a member 'less' of type 'std::partial_ordering' which does not have a complete definition.
error: program.exe :: Class 'std::weak_ordering' has a member 'less' of type 'std::weak_ordering' which does not have a complete definition.
error: program.exe :: Class 'std::basic_ostream<char,std::char_traits<char> >' has a base class 'std::basic_ios<char,std::char_traits<char> >' which does not have a complete definition.
Debug adapter exit code=3221225477 (0xc0000005), signal=null.
Tried reinstalling the extension and nuking .vscode\extensions\vadimcn.vscode-lldb-1.10.0 folder, but the doesn't help.