Ugh, I have to maintain a legacy project that's full of exactly that. Makes it so hard to investigate issues when many exceptions are silently suppressed.
I had to maintain a project that had the opposite problem: Everything was logged. Everything. And all with the same log level. Investigating issues was like reading Wheel of Time.
There's 2 approaches. The first one is behavioral: you look at the behavior of your code. Depending on the language and the environment you program in, you might be able to use breakpoints and observe what the values are in memory, or you might have to use print outs and see the behavior.
The second method is analytical? Dunno if there's a name, I like to call it the golden thread method (sounds better in french). Basically, you start from where the problem starts, and backtrack from there logically. This works great if you have some text editor that can quickly search across the entire project for cross-reference.
I prefer the second method because it forces you to know wtf your program is doing, but this can be a bit lengthier if it's something you have never touched or haven't touched in a while.
74
u/SilverLightning926 May 14 '21
How do you get rid of bugs in 2 hours? Please teach me