Guvi-blog-logo

The Art of Debugging

GUVI wishes you a very happy new year 2015.  This is Rajaraman from Team GUVI.  And today’s blog post is about debugging.
In software, everyone faces issues almost daily.  We need to be highly equipped to solve those issues.  Not all problems are straightforward to find out and require a lot of debugging to be done.  Hence debugging skills is of prime importance.  I would like to reiterate that everything in software development is an art.  Similarly debugging is also an art.  In this post I will focus on how to debug a software problem.

The art of debugging

Understand the architecture

    • The more the number of components in a system, the more complex it gets to solve an issue.  It is critical to understand the architecture of the software / the module in order to debug a problem.  Suppose your system has a client web browser and at the server side a web server and a database server.  What if this setup is required to be able to work through a VPN connection? And you get an error in your web server mentioning that you “Could not connect to the database server”, where do you think the problem might be.  The problem might be anywhere.  Hence it is very important to understand the architecture if you want to solve the problem quickly.

Analyze the entire picture

    • Once you get the entire picture, analyze the entire picture and try to see where the symptoms are lying.  I refer symptoms here because whatever you see is only a symptom, we need to trace to the problem in order to solve it.

From the symptom, try to trace the problem

    • Many problems tend to have more than one symptom, look out for those and try to get those hints.  In our example, “Could not connect to the database” is a symptom.  The problem might be due to various reasons.

Try to list different possibilities

Try to list out the different possibilities that might result in the actual symptom.  In our example, the symptom could be due to the following reasons

      • Database server is down
      • Database server is not listening on the expected port
      • Database server is not accessible from the webserver
      • Database server is not accessible through the VPN
      • Database server port is not accessible through VPN

Make an educated guess where the problem might be

    • Out of the possibilities, try to make an educated guess where the problem might be and try to dig into the problem.

Eliminate component by component

    • If you can’t make an educated guess, you need to identify the problem with the help of an elimination round.  Since you have the basic understanding of the architecture, try to eliminate it component by component.  That is how complex problems are solved by breaking them into individual pieces.

 

Hope this post was useful.  Comments are welcome.  Thanks for reading.
If you want to watch technical videos (Java, C, C++, etc.) in your native language, click here to visit our GUVI community.

 

Contact Form

By clicking 'Submit' you Agree to Guvi Terms & Conditions.

Our Learners Work at

Our Popular Course

Share this post

Author Bio

admin
admin

Our Live Classes

Learn Javascript, HTML, CSS, Java, Data Structure, MongoDB & more
Learn Python, Machine Learning, NLP, Tableau, PowerBI & more
Learn Selenium, Python, Java, Jenkins, Jmeter, API Testing & more
Learn Networking, Security Testing, IAM, Access Management & more

Hey wait, Don’t miss New Updates from GUVI!

Get Your Course Now

Related Articles