123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Technology,-Gadget-and-Science >> View Article

Debugging Source Code And Its Various Approaches For The Layman

Profile Picture
By Author: DJP Hybrid
Total Articles: 4393
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

Once errors are identified, it is necessary to first locate the precise program statements responsible for the errors and then fix them. Generally, the most difficult part of debugging is locating the invalid part of the source code. Once the error is found, correcting it is usually easy. Generally, debugging is a lengthy and tiresome task. The debugging skill of the programmer is probably the biggest factor in the ability to debug a problem.

There are several approaches for debugging. Programs known as debuggers exist to help programmers locate bugs. Debuggers enable the programmer to monitor the execution of a program, stop it, re-start it, set breakpoints, change values in memory and even, in some cases, go back in time. For debugging computer hardware and low-level software like device drivers, BIOS and firmware, instruments such as oscilloscopes, in-circuit emulators are frequently used.

Brute Force method is, though, the most common method of debugging, it is the least efficient method. In this approach, the program is loaded with print statements to print the intermediate ...
... values with the hope that some of the printed values will help to identify the statement in error. This approach becomes more systematic with the use of a symbolic debugger (also known as source code debugger), because the values of different variables can be easily checked and break points and watch points can be easily set to test the values of variables effortlessly.

Backtracking is also a fairly common approach. In this approach, beginning from the statement at which an error symptom is observed, the source code is traced backwards until the error is discovered. Unfortunately, as the number of source lines to be traced back increases, the number of potential backward paths increases and may become unmanageable large, thus limiting the use of this approach.

In Cause elimination method, a list of causes which could possibly have contributed to the error symptom is developed and tests are conducted to eliminate each cause. A related technique of identification of the error from the error symptom in the software fault tree analysis.

Program slicing is a technique which is similar to back tracking. However, the search space is reduced by defining slices. A slice of a program from a particular variable at a particular statement is the set of source lines preceding this statement that can influence the value of that variable.

Debugging is often carried out by programmers based on their ingenuity. Many a times, debugging requires a thorough understanding of the program design. Trying to debug based on a partial understanding of the system design and implementation may require an inordinate amount of effort to be put into debugging even for simple reasons. Debugging may sometimes even require full redesign of the system. In such cases, a common mistake that novice programmers often make is that they do not attempt to fix the error but only its symptoms. One must be beware of the possibility that any one error correction may introduce new errors. Therefore, after every round of error fixing, regression testing must be carried out.

About the Author:

Computer Juice offers a community of like minded individuals so you can get help for your computer problems. Visit us at - http://www.computer-juice.com/ or http://www.computer-juice.com/forums/.

Total Views: 197Word Count: 523See All articles From Author

Add Comment

Technology, Gadget and Science Articles

1. Top 5 Mistakes To Avoid With Apostilled Translations In Glasgow
Author: glasgowtranslationservices

2. Comparing In-house Vs. Freelance Academic Translation In London: Which Is Better?
Author: londontranslationservice

3. Collaboration Features In Video Platforms
Author: Zyan

4. The Role Of Translation Services In The Entertainment Industry
Author: premiumlinguisticservices

5. Kentico To Umbraco Migration: A Complete Guide For Seamless Transition
Author: Addxp Technologies

6. How To Use Data Analytics To Improve Your Marketing Campaigns: Social Media & Emerging Tech
Author: jatin

7. Busch Group Presents Innovative Vacuum Solutions At Battery Show Europe 2025 In Stuttgart
Author: Busch Vacuum Solutions

8. Myteam11 Data Scraping Helps Decode Player Trends For Winning Predictions
Author: Retail Scrape

9. Banners For Trade Shows: Standing Out In A Crowded Marketplace
Author: printitusa

10. Get Complete Solutions When You Get Your Business Tied To A Virtual Receptionist
Author: Eliza Garran

11. The Fundamentals Of A Successful Website That Gives A Winning Edge To Entrepreneurs
Author: Liam Mackie

12. How Seo Can Make Your Website Friendly For Google Page Ranking?
Author: Liam Mackie

13. The Call Answering Service Is A Must For Every Business Type!
Author: Eliza Garran

14. Choosing The Best Compliance Management Software: A Modern Business Imperative
Author: vishva

15. Web Scraping Food Delivery Platforms For Competitive Intelligence
Author: Food Data Scrape

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: