Hacker News new | ask | show | jobs
by wtetzner 1880 days ago
Stepping through can be a pain sometimes, because to find certain bugs it's easier to look through a log throughout a longer run of the program, and see how the state changes.

Of course, a debugger that could generate a log like that instead of pausing execution would give you that benefit too.

1 comments

Yes, this seems like an odd missing feature that would give me the best of both worlds: a "watchpoint", but that outputs to a log. It may be possible in VS debug or gdb but it's not really .. surfaced?
In gdb you can put commands to be executed on a breakpoint; you can put necessary prints + continue statement there.
This is possible in all JetBrains IDEs, just right-click the breakpoint and configure it that way.