What is Debugging? What Are The Different Debugging Approaches in Software Development
Imtiyaz Khan
Technology Leader at Ginesys One | Author & Mentor | Innovating Software Development for a Smarter Tomorrow
Without issues no development is complete. If there are no issues found during testing that means there is something wrong. Either the code quality is too good or the QA team didn't test it properly.?
Lets understand first
What is Debugging?
Debugging is the process of identifying, analyzing, and resolving issues or errors in a computer program or software system. The purpose of debugging is to find and correct problems that prevent the program from functioning correctly, producing incorrect results, or crashing.
Debugging often involves tracing the program's execution to locate the source of the problem. This can be done using various tools and techniques, such as print statements, log files, debugging software, and stepping through the code line by line. Once the problem is identified, the programmer can modify the code to correct the issue and test the changes to ensure that the problem has been resolved.
Debugging is a crucial part of software development and requires attention to detail, analytical skills, and patience. Effective debugging can help to improve the quality of software and make it more reliable and efficient.
During software testing, there are various types of issues that can be identified by the QA team. Here are some common types of issues that can occur during software testing:
The QA team reports all the issues to the development team during testing. Some issues get fixed right away but few of them need debugging efforts. Few of them take too much time to debug or find out.?
Sometimes the issues are scenario based.
What does that mean?
That means some issues occur in some specific situations or scenarios not directly. Normally, the product is working fine but in any specific scenario it's not working. Now finding that specific scenario is a critical task sometimes.
Lets understand the scenario based issues with help of an example?
Suppose there could be multiple ways or path to reach from A to B as given in below diagram
领英推荐
The Path A is straightforward and shortest. Path B is clean but will take some time compared to Path A but there is a problem with Path C as there is some road blockage problem over there. But if someone takes the Path C then what he/she will say.
He will say that the road condition is not good while traveling from A to B, right?
But the people who regularly travel via Path A or Path B will say there is no problem with roads. The road conditions are good but they don't know about Path C at all, right?
So, here is a scenario based problem. After going through all the possible ways we can confidently say that the way from A to B is good otherwise not. If the people rarely visit the Path C then it's very hard to meet the problem.
Isn't it, right?
So the same thing happens during software testing sometimes. During the unit testing developers test only the positive scenarios mostly. They don’t have much time to pay attention deeply to every possible scenario. Sometimes when QA teams report such types of issues. But that type of testing is always good. At least we can find some corner cases during testing which is a good thing.
Sometimes some issues take not only hours but days to find out. The same happened with me once. Sometimes I found an exception in kibana. I tested all the possible scenarios but the code was working fine. I put logs on the production server and started monitoring that. First three days I could not find any issue but on the fourth day I got the exception. After debugging I found that there was a cron job which was running every Thursday at 3:30AM. The exception was due to that cron job.
Now, you would be thinking that what are the different debugging approaches, right?
There are different approaches to debugging, and each approach can be useful in different situations. Here are some of the most common approaches to debugging:
The debugging process is very critical and tiring that sometimes people take multiple smoking breaks to find out a small issue. Sometimes you need a sleep to find out an issue. After a proper sleep the next day you can easily debug and fix an issue.
it's a very critical but the same time its an important process to improve our code quality and product performance as
If you find it useful please like it, share it and comment on it because this is the only way I can serve you better content always.
CONCLUSION
Debugging is part of software development. Without issues no development is complete. If there are no issues during testing then there is something wrong with testing. Debugging is a very critical and lengthy process sometimes. Sometimes It takes days to identify the issues and need deep debugging. Sometimes we need multiple smoking breaks or a proper sleep so that the next day you can easily find out the issue.