0

One of the things I love about python is how easy it is for me to debug a program by dropping an IPython.embed() line into my code and being able to have instant access to a terminal where I can check the values of all of my variables and perform tiny experiments to help me understand what's happening.

Lately I've been forced to dabble in C++ again, and although I'm loving the fact that everything is blazingly fast compared to naive python, I'm very bad at debugging things like segfaults. I'm averse to fancy IDEs with lots of confusing buttons and config and prefer to work with a simple text editor and a terminal.

I'm wondering if there are any terminal tools for debugging C++ in general and more specifically if anyone has seen anything at all like IPython.embed() in C++ (an interactive terminal you can drop into from the middle of your application).

Thanks, Jack

3
  • 1
    Sounds like you are looking for a command-line debugger like gdb (on Linux/Posix) or lldb (on MacOS/X). Commented May 22, 2020 at 5:42
  • Perhaps. What's the best resource you have on how to use gdb?
    – JacKeown
    Commented May 23, 2020 at 6:02
  • The best resource is Google -- go to google.com and enter the search term "gdb how-to", and read the results Commented May 24, 2020 at 3:19

1 Answer 1

0

I have tested a workflow on linux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.