Hacker News new | ask | show | jobs
by wumbernang 4022 days ago
No no no no. This is not right.

1. If you debug with this, you're debugging different code to what blew up in production for example. Subtle timing issues wiped out instantly and memory ballooning masked etc.

2. If you leave it in for prod, it's going to have masses of call overhead.

You can debug well with assertions, logging and unit tests. There is no need for this. I rarely have to spin up a debugger these days.

4 comments

I use de Node.js debugger a lot, I think is very useful when you don't know exactly what to log, and you don't what to start adding logging lines everywhere. You have one assumption but if you are wrong you can check different var, within the debugger step by step. Sometimes I even use the debugger inside a unit test.
The last time I used a debugger was when with VS/C# or IntelliJ/Java, many years ago. For the coding I do now, mostly Go/Python/JS, I find manual debugging techniques much more effective.
Indeed, it's like they've never heard of the term 'Heisenbug'
It's like they know that not all bugs are Heisenbugs.
Well that's a fair comment! It seems strange to me to describe debugging by instrumentation as 'awesome' - 'adequate' seems more appropriate to me. But then I'm not a Go developer so I don't know how the rest of the toolchain compares.
> No no no no. This is not right.

It's as worthwhile as the bugs they can find with it. I wish the author would tell us if he found the bug in the dns program.