How to let VS CODE print std::string of libc++? #12323
Replies: 1 comment
-
has move to issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I use libc++ as following:
https://libcxx.llvm.org/UsingLibcxx.html#gdb-pretty-printers-for-libc
GDB Pretty printers for libc++¶
GDB does not support pretty-printing of libc++ symbols by default. However, libc++ does provide pretty-printers itself. Those can be used as:
$ gdb -ex "source /utils/gdb/libcxx/printers.py"
-ex "python register_libcxx_printer_loader()"
then I can print string or vector in linux in gdb, and I can print it ok aslo in vsocde in debuger console as following:
-exec p request_body
$1 = (const std::__1::string &) @0x7ffff3eebc48: ""
But I put the mouse on the variable of the code, and the original data will still be displayed.
std::__1::__basic_string_common (base):
std::__1::__basic_string_common
npos:
18446744073709551615
__short_mask:
128
__long_mask:
9223372036854775808
_r
How to let VS CODE print std::string of libc++?
Thanks.
launch.json is here
"version": "0.2.0",
"configurations": [
{
...
"request": "launch",
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "",
"text": "source xxx/libc++/trunk/utils/gdb/libcxx/printers.py",
"ignoreFailures": true
},
{
"description": "",
"text": "python register_libcxx_printer_loader()",
"ignoreFailures": true
},
Beta Was this translation helpful? Give feedback.
All reactions