News for hackers. Stuff that matters.
Re:PySnooper: Never use print for debugging again by int_19h on Monday April 22, 2019 @10:32PM (#19725114)
I'm not sure what you mean by "debugger equivalent of print statements".

If what you want is a breakpoint that just prints something out when it's hit, then these already exist, e.g.:

https://code.visualstudio.com/docs/editor/debugging#_logpoin...

But "set breakpoint on a variable" kinda sounds more like a data breakpoint (i.e. break/log when value changes)? These also exist in some places:

https://docs.microsoft.com/en-us/visualstudio/debugger/using...

but usually with many limitations. The problem with these is that it's hard to implement it in such a way that there's zero overhead when not debugging. If I remember correctly, native data breakpoints have some hardware support on Intel, but for high-level languages it can be difficult to map their data model to something like that.

Re:PySnooper: Never use print for debugging again by badatshipping on Tuesday April 23, 2019 @12:43AM (#19725671)
Oh wow, I never knew about that. Thanks.