Merge pull request #452 from seezer/readme-gdb-prettyprinter

Readme: pretty printing with vscode-cpptools / gdb
This commit is contained in:
mergify[bot] 2021-09-09 16:19:52 +00:00 committed by GitHub
commit 2bb8561eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,9 +61,10 @@ For detailed explanation of the `.vimspector.json` format, see the
* [Closing debugger](#closing-debugger)
* [Terminate debuggee](#terminate-debuggee)
* [Debug profile configuration](#debug-profile-configuration)
* [C, C , Rust, etc.](#c-c-rust-etc)
* [C Remote debugging](#c-remote-debugging)
* [C Remote launch and attach](#c-remote-launch-and-attach)
* [C, C++, Rust, etc.](#c-c-rust-etc)
* [Data visualization / pretty printing](#data-visualization--pretty-printing)
* [C++ Remote debugging](#c-remote-debugging)
* [C++ Remote launch and attach](#c-remote-launch-and-attach)
* [Rust](#rust)
* [Python](#python)
* [Python Remote Debugging](#python-remote-debugging)
@ -1176,6 +1177,38 @@ licensing.
}
```
### Data visualization / pretty printing
Depending on the backend you need to enable pretty printing of complex types manually.
* LLDB: Pretty printing is enabled by default
* GDB: To enable gdb pretty printers, consider the snippet below.
It is not enough to have `set print pretty on` in your .gdbinit!
```
{
"configurations": {
"Launch": {
"adapter": "vscode-cpptools",
"configuration": {
"request": "launch",
"program": "<path to binary>",
...
"MIMode": "gdb"
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
}
}
}
}
```
### C++ Remote debugging
The cpptools documentation describes how to attach cpptools to gdbserver using