You use debugger = You're bad
You use debugger = You're bad
Other urls found in this thread:
en.wikipedia.org
twitter.com
how do i learn to use debugger? i feel like a script kiddo recompiling my program each time with all those prints
>how do i learn to use debugger?
1. choose one
2. use it
3. learn and repeat
prints are fine
>using print instead of stdout
ngmi
print means any kind of output to stdout in this contex, retard
It's a sentiment i've seen a ton of shitters use and a few decent programmers like Torvalds who argues against kernel debuggers because he wants to weed out people who don't spend years poring over the kernel before submitting a patch (but uses gdb all the time to see the ASM output personally).
Mostly I think it comes down to ease of debugging on the given platform but a big thing is also how much fucking worse debugging gets if you're running it through some templated virtual function-ridden piece of shit so anyone heavily into the OOP kool-aid gets antsy about the popularity of anything that'd require them to knock it off.
Just hook a good one up to your program and step through it while looking up the manual for related info if you need it.
What you need to use is totally dependent on your use-case and programming language but personal rec for a nice one is RemedyBG if you're on Windows running anything that makes use of PDBs like C/C++. (WinDBG Preview can also be useful for OS internal deep-dives)
that's not what was said. you're moving the goal posts
anyone who dogmatically refuses to use a debugger is as stupid as anyone who relies on them over logging
they are complementary, not mutually exclusive
how are you this autistic
>people who are smart enough to use a debugger write code I can't even understand -- foolz
The memes write themselves sometimes
If you use a debugger, you're trying too hard. The most fun aspect of programming is experimentation during troubleshooting. That creative space is satisfying and leads to code improvements and redesign.
M-MOMMY MILKY
dude, tomorrow is the deadline and you talk about redesign...
>(but uses gdb all the time to see the ASM output personally)
That's one of the primary uses of debuggers. Torvalds' opinion on debuggers is stupid and hypocritical, hence it can safely be disregarded.
Yes, real programmers™ never worry about the correctness of their code. They just churn out as many lines as possible because that's what counts.
Debugger is just another tool. Refusing to have more options in your toolset is retarded.
Debuggers are specially great when you have to reverse engineer some application or maybe just understand code someone else wrote (basically the same thing). You could do the same injecting random serialization and print calls, but a debugger will give you a much better idea on what's going on. It can show a lot more detail, like visible variables, the call stack, registers, assembly code on that line, can have it break when some value change, inspecting core dumps and so on.
Having more control and vision on what the application is doing is extremely helpful to the debugging process, good luck finding out how the compiler optimization is fucking you program without looking into all that.
Then again, most programmers only write CRUD applications anyway.
the last line is totally correct. if you need a debugger to debug code that YOU wrote, then you're either clueless on the things you yourself are writing or you're writing overly complex spaghetti.
>back in my day, we had to use printf to see our program state, and sometimes we didn't even print the state we really needed!
>kids these days and their breakpoints and their variable inspectors, they don't know what they're doing
Debuggers are super helpful when they are applicable. If the issue is happening on someone elses computer it will naturally not work.
Where do breakpoints even go?
Do they go on the line of code you want to test?
Or do they go on the line after, like a print would?
It’s all too ambiguous and confusing for me.
i've used gdb many times before but one thing that I never got is how breakpoints work with loops. from my experience, they don't seem to actually trigger the breakpoint each loop which is very confusing
>>back in my day, we had to use printf to see our program state
Nice meme, but debuggers are older than C and printf.
en.wikipedia.org
>Deadlock bugs
Print each functions name as it completes and the thread calling it
>Exceptions from somewhere unexpected
lol what? When are exceptions expected? and how is a debugger gonna be better at catching them than print statements at the edge of your nascent code.
>If the issue is happening on someone elses computer it will naturally not work.
Remote debugging is a thing.