When I debug the program by stopping at a breakpoint, the queues and stacks show as size=0 when they are not, but the other variables like vectors work fine.
MacOS 10.14.1 Mojave Cmake 3.12.3 Xcode C++ compiler LLDB 6.0 Debug Mode
When I debug the program by stopping at a breakpoint, the queues and stacks show as size=0 when they are not, but the other variables like vectors work fine.
MacOS 10.14.1 Mojave Cmake 3.12.3 Xcode C++ compiler LLDB 6.0 Debug Mode
The bug is CPP-14918. The workaround is really simple, which is a good thing!
You must find your active CLion application (this can be in various places. For instance mine is in my Library at ~/Library/Application\ Support/JetBrains/Toolbox/apps/CLion/ch-0/191.7141.37/CLion.app
From terminal, cd to the CLion.app directory.. and then cd to 'Contents/bin/lldb/renderers/lldb_formatters'
In there is the file init.py You need to edit that (use sublime, vim, vi, or whatever), and comment out everything except for the import lldb on the first line.
so..
import lldb
#lldb.debugger.HandleCommand('script import lldb_formatters.jetbrains_stl_formatters')
#lldb.debugger.HandleCommand('type synthetic add -l lldb_formatters.jetbrains_stl_formatters.StdDequeSynthProvider -x "^std::deque<.+> >(( )?&)?$"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^std::deque<.+> >(( )?&)?$"')
#
#lldb.debugger.HandleCommand('type synthetic add -l lldb_formatters.jetbrains_stl_formatters.StdDeque11SynthProvider -x "^(std::__1::)deque<.+>$"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^(std::__1::)deque<.+>$"')
#
#
#lldb.debugger.HandleCommand('type synthetic add -l lldb_formatters.jetbrains_stl_formatters.StdHashtableSynthProvider -x "^(std::tr1::)unordered_set<.+>.*"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^(std::tr1::)unordered_set<.+>.*"')
#
#lldb.debugger.HandleCommand('type synthetic add -l lldb_formatters.jetbrains_stl_formatters.StdHashtableSynthProvider -x "^(std::tr1::)unordered_map<.+>.*"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^(std::tr1::)unordered_map<.+>.*"')
#
#lldb.debugger.HandleCommand('type synthetic add -l lldb.formatters.cpp.gnu_libstdcpp.StdMapSynthProvider -x "^std::multimap<.+> >(( )?&)?$"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^std::multimap<.+> >(( )?&)?$"')
#
#lldb.debugger.HandleCommand('type synthetic add -l lldb_formatters.jetbrains_stl_formatters.StdSetSynthProvider -x "^std::set<.+> >(( )?&)?$"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^std::set<.+> >(( )?&)?$"')
#
#lldb.debugger.HandleCommand('type synthetic add -l lldb_formatters.jetbrains_stl_formatters.StdSetSynthProvider -x "^std::multiset<.+> >(( )?&)?$"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^std::multiset<.+> >(( )?&)?$"')
#
#lldb.debugger.HandleCommand('type synthetic add -l lldb_formatters.jetbrains_stl_formatters.libcxx_hash_table_SynthProvider -x "^(std::__1::)unordered_(multi)?(map|set)<.+> >$"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^(std::__1::)unordered_(multi)?(map|set)<.+>.*"')
#
#lldb.debugger.HandleCommand('type synthetic add -l lldb_formatters.jetbrains_stl_formatters.stdmap_SynthProvider -x "^(std::__1::)(multi)?(map|set)<.+> >$"')
#lldb.debugger.HandleCommand('type summary add -F lldb_formatters.jetbrains_stl_formatters.SizeSummaryProvider -e -x "^(std::__1::)(multi)?(map|set)<.+> >$"')
Needless to say, if you don't like the lack of the jetbrains stl formatters then you can uncomment the lines. However, the problem is in those formatters.
You may not get what you want - there are clearly other problems with the formatters - but you will get eg. the size showing.