am pretty excited with the GNU Debugger and a GUI called Insight as it has saved me A LOT OF time. Thus I am posting this question/answer for other newbies out there like me having problems with their C code looking for a visual way to see what's going on.
I am working on Linux Mint (Ubuntu) btw.
gdbgui is a browser-based frontend to gdb , the gnu debugger. You can add breakpoints, view stack traces, and more in C, C++, Go, and Rust! It's perfect for beginners and experts. Simply run gdbgui from the terminal to start the gdbgui server, and a new tab will open in your browser.
To exit GDB, use the quit command (abbreviated q ), or type an end-of-file character (usually C-d ). If you do not supply expression , GDB will terminate normally; otherwise it will terminate using the result of expression as the error code.
GDB stands for the “Gnu DeBugger.” This is a powerful source-level debugging package that lets you see what is going on inside your program. You can step through the code, set breakpoints, examine and change variables, and so on. Like most Linux tools, GDB itself is command line driven, making it rather tedious to use.
You need to help gdbgui out by typing main into the file browser box: and selecting the main.rs file. The source code should then appear in the browser and you can click to set breakpoints and run the program. Of course, if you want to break in some other file, you can find that in the file browser instead.
I highly recommend ddd especially if you have complex data structures to visualize.
_
$ sudo apt-get install insight
$ gcc -g source.c -o application
$ insight
When developing for Windows using GCC. The best is to use Affinic Debugger GUI(GDB). it is newer design. it is similar and better than DDD. It also works for Linux and Mac
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With