|
|
|
|
|
by maples37
250 days ago
|
|
Can you share what the experience is like debugging with gdb directly? I'm new enough that my first debugger experience was Visual Studio, and I currently use IntelliJ IDEs which provide a similar experience. That experience consisting of: setting breakpoints in the gutter of the text editor, visually stepping through my source files line by line when a breakpoint is hit, with a special-purpose pane in the IDE visible, showing the call stack and the state of all local variables (and able to poke at that state any point higher up in the stack by clicking around the debug pane), able to execute small snippets of code manually to make evaluations/calculations based on the current program state. I'm not so naive to believe that effective debugging tools didn't exist before GUIs became commonplace, but I have a hard time seeing how anything TUI-based can be anywhere near as information-dense and let you poke around at the running program like I do with my GUI-based IDEs. (Pasting this comment under a few others because I genuinely want to hear how this works in the real world!) |
|
Then „n“ for next line, „s“ for step-in, „fin“ to go to the end of the function
Dprintf for adding dynamically printfs for watching variables
List will show you 10 (default) lines of code around the cursor, bt will show you a backtrace…
I think that covers the basics. As you can see, ist just a keypress mostly for doing anything.
With Emacs you can click on the fringe for setting/deleting breakpoinst.
The bread and butter is really easy, and other than seeing the cursor in the code, there is no advantage. In Emacs you DO see the cursor moving…