What are the different approaches to debug the Software Applications
Several approaches are being practiced in the industry for debugging software under test (SUT).
Some of the approaches are described below.
1) Brute Force Method: This method is most common and least efficient for isolating the cause of a software error. We apply this method when all else fail. In this method, a printout of all registers and relevant memory locations is obtained and studied. All dumps should be well documented and retained for possible use on subsequent problems.
2) Back Tracking Method: It is a quite popular approach of debugging which is used effectively in case of small applications. The process starts from the site where a particular symptom gets detected, from there on backward tracing is done across the
entire source code till we are able to lay our hands on the site being the cause. Unfortunately, as the number of source lines increases, the number of potential backward paths may become unmanageably large.
3) Cause Elimination: The third approach to debugging, cause elimination, is manifested by induction or deduction and introduces the concept of binary partitioning. This approach is also called induction and deduction. Data related to the error occurrence are organized to isolate potential causes. A “cause hypothesis” is devised and the data are used to prove or disprove the hypothesis. Alternatively, a list of all possible causes is developed and tests are conducted to eliminated each. If initial tests indicate that a particular cause hypothesis shows promise, the data are refined in an attempt to isolate the bug.
Tools for Debugging: Each of the above debugging approaches can be supplemented with debugging tools. For debugging we can apply wide variety of debugging tools such as debugging compilers, dynamic debugging aids, automatic test case generators, memory dumps and cross reference maps. The following are the main Debugging tools available in the market.
The following information is based upon details from respective web-sites of the tool vendors
1) Turbo Debugger for Windows: The first debugger that comes to mind when you think of a tool especially suited to debug your Delphi code is of course Borland’s own turbo debugger for windows.
2) HeapTrace: Heap trace is a shareware heap debugger for Delphi 1-X and 2-X applications that enables debugging of heap memory use. It helps you to find memory leaks, dangling pointers and memory overruns in your programs. It also provides optional logging of all memory allocations, de-allocations and errors. Heap trace is optimized for speed, so there is only a small impact on performance even on larger applications. Heap trace is configurable and you can also change the format and destination of logging output, choose what to trace etc. You can trace each allocation and de-allocation and find out where each block of memory is being created and freed. Heap trace can be used to simulate out of memory condition to test your program in stress conditions.
3) MemMonD: MemMonD is another shareware memory monitor for Delphi 1-X applications. It is a stand-alone utility for monitoring memory and stack use. You don’t need to change your source code but only need to compile with debug information included, MemMonD detects memory leaks, de-allocations with wrong size.
4) Re-Act: Re-Act is not really a debugger for Delphi, but more a Delphi component Tester. However, this tool is a real pleasure to use. So we could not resist including it in this list of debugging tools. Currently, reach is for Delphi 2 only, but a 16 bits version is in the works. React version 2.0 is a really rice component, view and change properties at run time with the built in component inspector, monitor events in real time, set breakpoints and log events visually and dynamically. You can find elusive bugs, evaluate third party components and learn how poorly documented components really work. If you build or purchase components you need this tool. It’s totally integrated with Delphi 2.0 and the CDK 2.0.
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.