6

!ok

A guy just told me that printing variables to check for errors is better than debugging!

I am done talking to him 😂

Comments
  • 1
    Is he afraid of the unknown? I don't see another explanation.
  • 2
    Yep, easier, faster, works well with multithreading and doesn't influence timing that much + when logged provides wider context.
  • 2
    @misiman Debugging is way way better in all the contexts u mentioned (at least in Visual Studio) .. And i think error logs a very different than this situation (as per my experience)
  • 1
    @Prk123 If you want to explore one state at one point in time with tool you are familiar with then maybe. In general you either have to setup breakpoints which in multiprocess environment can lead in claiming in your process is not responing or you just log the state and then print is basically just the same with only difference being that you don't have to setup extra tool. Can't imagine any other way to get broader context than logging and then again, you are just using complex tool to solve simple task. In general I found debugers to be really usefull just to help analyze cores. That is the use case when they shine. Normal development, prints are much faster and easier to do and provide sometimes even more information.
  • 2
    @misiman well maybe when it's a very small use case. But in our case, we have complex classes and checking each object by printing all it's properties is simply a waste of time as i see it. We can simply put a debug point and get better results.
    PS. VS debugging is really amazing even with multiple threads and parallel processes !
  • 0
    @Prk123 Well, I ussually print just stuff I'm interested in and I'm trying to keep stuff simple (helps not just with debuging). So yep, there are cases when debugers are needed (like coredump analyses, embedded) and cases when printing stuff is better, anything in between is just a matter of taste. Used VS last time in uni maybe something like ten years ago, UI was confusing as hell so haven't used it since. But I heard that nowadays it could be even used to develop on mainstream platform like Linux. Good for people used to it.
Add Comment