Debugging: Tips To Get Better At It
- Always fix one problem at a time. You may find another error while solving one problem but don’t mess up with another piece of code. Always pick a single problem, solve that and then pick another one to solve that else you will be confused or this may become a nightmare to handle.
- Read your code carefully sometimes it can be a very small mistake like semicolon or comma or brackets. If you are a beginner and learning the code chances are higher that your code is not exactly the same as the teacher is trying to teach you so read your code carefully every time.
- If you are using any kind of framework, in that case, keep yourself updated with your framework. Companies make regular changes in those frameworks so keep yourself updated with that.
- Take a break and walk away from your system to reset your mind if you start losing your patience or you are exhausted. Do some other activity for some time. Listen to music or drink a glass of water or give proper rest to your eyes. You may come up with another approach to debug your code or starting everything all over again after a short break can be helpful to resolve the issue.