4 ms·
I rarely use a debugger. The experience is just awful in almost every debugger I've used. For low level code where you really want to see all the program/funct
by sirwhinesalot 5y ago
I rarely use a debugger. The experience is just awful in almost every debugger I've used.
For low level code where you really want to see all the program/function state evolving over time, they can be useful.
Your Java program throws some random NullPointerException? Prints, and lots of them. The experience with the debugger is miserable. I set a breakpoint somewhere, then do I jump or step or whatever? Who knows, all I know is whichever I pick is the wrong one everytime.
I saw another poster mention a debugger that lets you put breakpoints that print stuff. Now that would make me use a debugger all the time. Maybe the debuggers I have used already support that, I certainly wouldn't know if they do, they didn't make it discoverable.
- juangacovas 5y agoWell, a debugger on a breakpoint should allow you to inspect any local scope variables along the globals, go through the call stack.. And you can watch vars, execute immediate commands and more in others. If that's not "print" on breakpoint...
- sirwhinesalot 5y agoI don't want to print on a breakpoint, that is again useless, the cause of the problem might be far removed from the location of the exception. I want multiple breakpoints, each of which prints data, so I get a log of the behaviour of the relevant parts of the program overtime. Being able to stop the program at a single point does not help, not unless I can actively move backwards in time (not in the stack!) like in the Elm debugger (actually useful).
- 369548684892826 5y ago> Your Java program throws some random NullPointerException? Prints, and lots of them. Or just tell your debugger to break on exception.
- sirwhinesalot 5y agoThat's useless, debugging a NPE is about figuring out where the null originated. Breaking on the exception is too late.
- marcolinux 5y agojava 14, helpful NullPointerExceptions? https://openjdk.java.net/jeps/358 https://openjdk.java.net/jeps/358