I'm trying to debug a large C++ project on Linux remotely, which is a little difficult to re-build via Visual Studio locally. Therefore I attempt to debug it via console. While, the gdb
or gdb --tui
or gdb-dashboard
tools is not convenient for interaction. I think pudb
is a tool for python in the term of interaction. Therefore, are there any better text UI debuggers via console for C++?
Thanks for telling me the tools or any suggestion, I will really appreciate it!

- 83
- 5
-
What do you consider the most important features of `pudb` that `gdb -tui` is missing? What do you mean it's not convenient for interaction? – ssbssa Feb 21 '21 at 12:46
1 Answers
pudb is awesome and you can drop into an IPython terminal at any time with the current local variables. You probably won't get that level of interaction in C++ anytime soon. But gdb is very powerful and using the TUI plus some pretty-printers is definitely very usable, even in larger projects.
It helps if you read the documentation and learn some tricks, such as using gdb's convenience variables. You can store an object in a convenience variable when it is in scope and access it later to check its state using the convenience variable (as long as it still exists).
Using breakpoint commands and a .gdbinit
file with repetitive commands also helps a lot.
If you want to implement pretty printers for some of you classes, I think looking at other people's code is a great way to start. Here you can see some pretty printers for some classes in the armadillo library (used for linear algebra).

- 3,294
- 1
- 16
- 27