ALL >> Technology,-Gadget-and-Science >> View Article
Debugging Source Code And Its Various Approaches For The Layman
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/.
Add Comment
Technology, Gadget and Science Articles
1. The Economics Of Final-stage Package Delivery: A Comprehensive Market OverviewAuthor: Shreya
2. Growth Outlook Of The South Korea Cytogenetics Market: Clinical Applications And Technological Innovations
Author: Shreya
3. U.s. Water And Wastewater Treatment Technologies Market 2025–2035: Growth Trends And Future Opportunities
Author: Shreya
4. Instashop Egypt Real-time Api - Sku-level Stock & Availability Mapping
Author: Actowiz Solutions
5. Web Scraping Canadian Grocery Retailer Pricing Data
Author: REAL DATA API
6. Why Erp Is Critical For Manufacturing Innovation
Author: Focus Softnet
7. Umbraco Vs Wordpress: Choosing The Right Cms For Your Business
Author: Addact Technologies
8. How Web Development Enables Seamless Integration With Third-party Tools And Apis
Author: jessika
9. E-commerce Growth By Jumia Data Scraping For Market Research
Author: Web Data Crawler
10. Web Scraping Api For Minibar Delivery Liquor Data In Usa
Author: Food Data Scraper
11. Web Scraping Hulu Ratings And Engagement Data
Author: REAL DATA API
12. Christmas Liquor Demand Data Scraper
Author: Actowiz Solutions
13. Best Buy Product Price & Item Data Scraping Guide
Author: Retail Scrape
14. Top 100 Christmas Gifts 2025 Data Analytics
Author: Actowiz Metrics
15. Scrape Ezpawn Store Locations To Map Pawn Industry Trends
Author: REAL DATA API






