>Yeah, I debug using print statements, how could you tell?
Yeah, I debug using print statements, how could you tell?
Other urls found in this thread:
How else would you do it across all platforms/IDEs/languages?
>not using try and except
take programming 102
I debug by changing individual lines of code until the problem goes away
Logging libraries
Greg....is that you?
It's all fun and games until you have to use php and xdebugger isn't working
based
really, logging is just dead useful
.catch(e => {console.log(e)})
maybe(global.cache(&errorVariable, *fp()))
>not setting bugs=false
var_dump()
>the virgin try and catch
>the chad crash early and often
>not debugging using print statements
>causing the language to crash because you're a woman and can only use a debugger since you dont know the language
debugging with print is giant brain shit
youtube.com
Google talk where Niklaus Wirth (creator of Pascal) shares a story about a punch-card equivalent of debugging with print statements.
So what, do you expect me to use a debugger and a fancy IDE?
No, I write tests, attempt to reproduce bugs, and talk to rubber ducks. Occasionally I use print statements.
Otherwise, using debuggers is often a luxury which I don't have.
Based OOP man
try-catch isnt debugging, its exception handling which is different
I use it to find out how shit works when retards don't comment the code
with python
.catch(console.error)
>all these brainlets ITT who think you can catch a logical error with an exception
also
>removing one line of print vs unwrapping the whole try...catch block
the exception virgins
Nigger just use gdb.
Debugging with network print statements is the only option for firmware dev. Of course in C using vim for development.
its faster than attaching the debugger, switching to a different tab etc (at least in vscode)
one solution would be to keep the debugger running all the time, but whatever
I do this. Haven't tried to learn to use a debugger.
Where would using print break down?
>Where would using print break down?
it's inefficient... in debuggers you can follow through the process and see how the data changes.
print statement obviously gives you the data at one point in time only
It's viable option only when you're locating the problem. When it comes to examining data, you're fucked.
>debug_print_data(T data, size_t size)
:^)
Using both, a debugger and debugging with printf for different problems is galaxy brain tier.
printf statements can give you a good oversight on how your data changes because it leaves a good log with relevant information.
A debugger grants you a better insight into your code.
It's the only viable way to debug loops. What, do you actually want to stop at every iteration?
more and more "experienced" developers don't even know how to use a debugger.
this is true. Being now over 16 years employed, I have yet to find someone who does not use print statements. Welcome to germany or something.
>tfw bash
>just redirect a subshell to a file
based
So print statements?
good post
if you're writing good code, with functional paradigms in mind, print statements are really all you need. When you avoid heavy state manipulations, and your functions are pure, it's as easy as finding what arg is causing the break, and where that arg is coming from.
if youre writing object-oriented bullshit (sometimes unavoidable) and your functions are all side-effecting and return void, then youve got bigger problems than debugging.
Based and house M.D pilled
>Yeah, I'm the one posting 20 how could you tell threads a day, how could you tell?
Is Jow Forums really just a board for undergraduate CS students to pretend they're smarter than each other? What kind of retarded shit is this? Why is exception handling even in the same conversation as print debugging?
gdb
>how could you tell?
You look extremely stupid.