Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

50% Positive

Analyzed from 164 words in the discussion.

Trending Topics

#print#debugging#foo#written#another#debugger#why#log#code#haven

Discussion (10 Comments)Read Original on HackerNews

awoimbeeabout 6 hours ago
Debugging in python is already so easy with `print(f"{myvar=}")` and `breakpoint()`...
Hackbratenabout 3 hours ago
This is the correct answer. `ic(foo(123))` can be written as `print(f'{foo(123)=}')` without depending on yet another third-party library which is not pulling its weight.
oweilerabout 8 hours ago
Or use tests and/or a debugger. Which gives you all the listed benefits w/o an additional dependency.
pjmlpabout 7 hours ago
Yeah, the amount of wasted hours with 1960's teletype debugging.

Ah but servers and embedded, that is why telemetry, execution traces, and debugger controlled action points exist.

RockRobotRockabout 8 hours ago
>Do you ever use print() or log() to debug your code?

I haven't written my own code in months at this point...kind of depressing to think about

squirrellousabout 2 hours ago
My first thought as well. Debugging is actually a decent use case of AI.
smackeyackyabout 4 hours ago
I haven’t used print for debugging for ages. Now it’s all trace on azure and hope your bug ends up in the sampled data in whatever that stupid thing is called. App insights or some rubbish. Apparently a good old log file just isn’t good enough it has to be larded up with a query language. Grep was fine guys.
IshKebab17 minutes ago
...use slightly fancier print() instead!
Borborygymusabout 5 hours ago
Remember COBOL's EXHIBIT?
soiziabout 7 hours ago
why another tool for that ? think standard with other team/company and use the same integrated ones.