vplot is a python extension for lldb for visualization of C++ containers as plotly graphs from the debugger.
The following text assumes that you cloned vplot to ~/vplot.
$ pip install plotly
$ pip install numpy
$ pip install pandas
To do that you can enter the following in lldb everytime you start it.
(lldb) command script import ~/vplot/src/vplot.py
or you can add the line to ~/.lldbinit
- Show std::vector variable
test_vector
from lldb at a breakpoint.
(lldb) fr v --summary vplot test_vector
- Set the graph color.
(lldb) vplot color (red|blue|black|green|rgb(r,g,b))
- Clear the graph.
(lldb) vplot clear
To generate the image at the beginning, you can use example. To build it:
$ cd ~/
$ mkdir build
$ cd build
$ cmake ../vplot/example
$ make
Start debugging:
$ lldb vplot_example
In the debugger:
(lldb) br s -f main.cpp -l 14
(lldb) br s -f main.cpp -l 19
(lldb) run
(lldb) fr v --summary vplot test_vect
You should see the first graph.
(lldb) vplot color red
(lldb) cont
(lldb) fr v --summary vplot test_vect1
The second graph should be in red.
Only std::vector is supported at this time