this post was submitted on 07 Jul 2023
1815 points (98.1% liked)

Programmer Humor

33216 readers
2 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] ghariksforge@lemmy.world 46 points 2 years ago (6 children)

I believe in a conspiracy theory that nobody uses debuggers.

[–] HairHeel@programming.dev 25 points 2 years ago (2 children)

console.log counts as “a debugger”, right?

[–] marlowe221@lemmy.world 10 points 2 years ago

It does for me!

[–] erogenouswarzone@lemmy.ml 3 points 2 years ago

Yes, but only because it gives you a link to where that was run. Click the link to the right with filename:lineNumber, and it will open the sources tab to that line. Set a breakpoint and rerun to pause there, then step through the code's execution.

Of course, if you're using minified or processed code, this will be more difficult, in that case figure out how to do it in VS Code.

[–] AeroSoap@lemm.ee 24 points 2 years ago (2 children)

I have used them occasionally. It's sometimes easier to use logging because you can dump an enormous amount of information and quickly then look through it if you already know what kind of information you want to look at. Debuggers are better when you have no idea what the hell is going wrong and need to get a little bit of info from everything instead of a lot of info from one thing.

[–] pm_me_your_happiness@lemmy.one 15 points 2 years ago (1 children)

I work with 20 year old legacy spaghetti code, the debugger has become one of my most treasured tools.

[–] Hazzia@discuss.tchncs.de 3 points 2 years ago

I also work with 20 year old spaghetti code, but my software is primarily middleware and debuggers aren't allowed on the full system where I'd actually be able to reproduce the issue. Insane amounts of logging statements have become my most treasured tool.

[–] croobat@lemmy.world 7 points 2 years ago

Grep log will outlive us all

[–] AlexWIWA@lemmy.ml 11 points 2 years ago (1 children)

I use them daily. It makes it so much easier to work with an existing code base

[–] erogenouswarzone@lemmy.ml 4 points 2 years ago (1 children)

Yep. Once you get the hang of it, you will cringe to think of all the wasted effort that came before. But getting the hang of it takes dedication.

[–] AlexWIWA@lemmy.ml 1 points 2 years ago

Thankfully I use python mostly and pycharm makes it easy-ish to get the debugger hooked up to a project. But learning that process definitely took a few days

[–] CanadaPlus@lemmy.sdf.org 3 points 2 years ago

Does this include C programmers? I've definitely found GDB to be indispensable in the past (or maybe that's what they would want you to think).

[–] rikudou@lemmings.world 2 points 2 years ago

I can record a video tomorrow if it helps?

[–] theherk@lemmy.world 2 points 2 years ago

After decades of print debugging I finally got dap up and running in vim. It is very nice. Would recommend.