

Ask HN: Debugging by printing in C with vim/emacs - snlpoll

Is there a way to add and remove prints the way we add&#x2F;remove breakpoint in debugger?Basically i want a workflow where i can
1. Mark places in a file to add prints to be inserted in the code and a single command&#x2F;script
would add them.
2. delete all prints with single command&#x2F;script.
======
greenyoda
Not sure why you'd want to do this with your editor. The gdb debugger can add
breakpoints that automatically print values of variables when they're hit. And
gdb can also be scripted, so you can write a gdb script that automatically
adds all the breakpoints you want.

~~~
snlpoll
because i am working on bootloader, gdb would be overkill

