I've searched for countless hours trying to find a C debugger, or a frontend to GDB, on Linux. There are so many options and yet so few I would actually use. It seems like every one of them is abandoned halfway.
My requirements aren't that esoteric and really have a hard time imagining how anybody debugs C code without them.
Every debugger I tried got these ones right: breakpoints, step in/over/out, continue/pause, and stack traces.
But these are the ones I really need and almost every debugger is missing at least one:
1) show the code that is being debugged, not one line at a time but the whole file so I can see the context and scroll up and down.
2) arbitrary watch expressions view that automatically and immediately update on every step.
3) able to expand and collapse structs and pointers in the expressions view and have them stay that way when they update.
4) remember my breakpoints and watch expressions per project and automatically load them.
And some nice haves:
5) configurable window layout.
6) custom display/format of custom types for the watch expressions.
I have tried the following and many more but ultimately gave up on them:
- gdb's builtin tui: it misses almost all the above except #1.
- various gdb scripts (pwndb, gef, peda): same as gdb's builtin tui.
- ddd: extremely hard to use UI.
- seer: I think it missed #3 and #4.
- xxgdb
- kdbg: I remember it had many bugs and couldn't properly restart/reload the program.
- gdbgui
- gdb-frontend
- emacs GUD: buggy, hard to use, expressions go in speedbar in another frame which is just so weird in terms of UX.
RemedyBG is pretty nice and I think covers everything but it's Windows only.
Currently, gf is the only one I found that matches my needs.
I hope this is helpful. I'm curious how everybody else approaches debugging C on Linux.
Seer has the concept of 'projects'. A project can hold many settings, including breakpoints, watchpoints, etc... It is a manual thing so save a project and load a project. Not sure what you mean by 'automatically load'.
Seer has a visualizer to view a struct and expand it, updating after each step/next.
A recent change (in the project's github "main") now has struct visualization in the Variable Logger, Tracker, and Local Variables views. All expandable.
2 comments
[ 5.5 ms ] story [ 16.4 ms ] threadMy requirements aren't that esoteric and really have a hard time imagining how anybody debugs C code without them.
Every debugger I tried got these ones right: breakpoints, step in/over/out, continue/pause, and stack traces.
But these are the ones I really need and almost every debugger is missing at least one:
1) show the code that is being debugged, not one line at a time but the whole file so I can see the context and scroll up and down.
2) arbitrary watch expressions view that automatically and immediately update on every step.
3) able to expand and collapse structs and pointers in the expressions view and have them stay that way when they update.
4) remember my breakpoints and watch expressions per project and automatically load them.
And some nice haves:
5) configurable window layout.
6) custom display/format of custom types for the watch expressions.
I have tried the following and many more but ultimately gave up on them:
- gdb's builtin tui: it misses almost all the above except #1.
- various gdb scripts (pwndb, gef, peda): same as gdb's builtin tui.
- ddd: extremely hard to use UI.
- seer: I think it missed #3 and #4.
- xxgdb
- kdbg: I remember it had many bugs and couldn't properly restart/reload the program.
- gdbgui
- gdb-frontend
- emacs GUD: buggy, hard to use, expressions go in speedbar in another frame which is just so weird in terms of UX.
RemedyBG is pretty nice and I think covers everything but it's Windows only.
Currently, gf is the only one I found that matches my needs.
I hope this is helpful. I'm curious how everybody else approaches debugging C on Linux.
> seer: I think it missed #3 and #4.
Seer has the concept of 'projects'. A project can hold many settings, including breakpoints, watchpoints, etc... It is a manual thing so save a project and load a project. Not sure what you mean by 'automatically load'.
Seer has a visualizer to view a struct and expand it, updating after each step/next.
A recent change (in the project's github "main") now has struct visualization in the Variable Logger, Tracker, and Local Variables views. All expandable.