3 ms·
When the stack trace is inscrutable, I find binary search debugging to be helpful. Comment out half of the functionality, see if the error is still there. Narro
by dwaltrip 10y ago
When the stack trace is inscrutable, I find binary search debugging to be helpful. Comment out half of the functionality, see if the error is still there. Narrow the search to the half that is causing the problem, rinse, and repeat until the offending line of code is found.
However, if the error occurs inconsistently, this approach can be much harder to use.