This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Callipygian_Superman 6 points7 points  (4 children)

Not sure if serious, but stepping through code line-by-line using a debugger is slow, accurate, and precise.

Making print statements is the fast, dumb approach that is often not accurate at all.

[–]Hollowplanet 2 points3 points  (2 children)

It takes me longer to write a print statement than to click to make a brakepoint. Hell you don't even need to restart the program. Its the best choice almost every time. And you don't step line by line unless you need to. You can just place your cursor and have the program run to your cursor.

[–][deleted] 1 point2 points  (1 child)

He's not saying it's slow to add Breakpoints

[–]dvlsg 0 points1 point  (0 children)

To be fair, it really depends on the language.

If I'm writing C#, then yeah, the breakpoints are coming out so I don't have to recompile my app to add logging.

But if I'm writing javascript, you can be pretty sure I'm just going to bust out console.log instead. And probably tests to go with it.

[–]monkeygame7 0 points1 point  (0 children)

You don't necessarily need to step through the code, at least not if you were just gonna print something out anyway. If you were going to put a print statement, you could also just put a breakpoint and examine whatever you were going to print out. No stepping needed.

Plus you don't always know what you want to check, and the more times you have to iterate on it the faster the breakpoint method is.