This is a nice little trick for print-debugging that should work in almost any IDE that supports conditional breakpoints. Put the print statement as a side effect to the condition, and have the condition evaluate to false. The result is a non-blocking breakpoint that won’t accidentally get checked into production code.
+1 useful. Recently I’ve taken arms against a sea of sysouts, pushing log messages to replace them. This conditional breakpoint print is better for debug prints intended temporary.
Comments are closed.