<p>When a little side project stopped updating its preview, I initially added console messages everywhere. Ten minutes later I had more messages than useful information.</p><p>I started logging a single object at the boundary of each step instead: the input, the identifier of the item being edited and the result. Keeping those three pieces together made it much easier to spot an old identifier being reused.</p><p>After fixing the issue, I removed the noisy logs and left a short explanation beside the code that needed it. I also wrote down the exact sequence that had produced the failure.</p><p>There was no clever trick involved. Making each step understandable saved more time than guessing where the problem might be. I would like to get better at doing that before the debugging session becomes a small expedition.</p>
A tiny JavaScript habit that made debugging easier
When a little side project stopped updating its preview, I initially added console messages everywhere. Ten minutes later I had more messages than useful information.
Комментарии (0)
Комментариев пока нет. Станьте первым!