Introduction to Debugging Techniques

The development process is replete with areas where tools can be used. The need to debug applications is an inherent part of the development process. From the point at which a piece of code is written and executed, developers need to verify that the application does what it is supposed to do. This is where debugging techniques come in. Debugging techniques help developers trace the flow of execution of the application and the intermediate state of the application.

Techniques for understanding the flow of execution are not limited to developing an application. These techniques are equally relevant when an application is deployed. Consider a scenario where customers using your application are facing problems. Because the application is at your customer's site, you cannot use your development tools to solve the problems. What do you do? The next best option is to re-create the problem in your development environment, find the problem, and fix it. The only hitch is that you do not know what your customers were doing when the problem occurred. Software applications behave differently in different scenarios and errors may or may not occur consistently for all scenarios. Wouldn't it be helpful if your application could record which steps are being executed so that you could accurately re-create the conditions under which the errors occurred?

From the preceding example, there are three primary techniques that can be used:

  • Debugging Debugging means to determine the flow of execution in an application.

  • Assertion Assertion involves use of conditional checkpoints in an application. The checkpoints determine whether an application is executing properly, based on the state of the conditional checkpoints.

  • Tracing Simply put, tracing is identifying the trail of the application. Tracing is performed either during development or when an application is installed and running at a deployed site.

  • Logging Logging is essentially recording the activity of the application. Logging can be performed either during development or at a deployed site.

Even though all of these techniques seem similar and intertwined, there are certain areas where you would favor one technique or another. Take a look at these techniques to understand them better.



Sams Teach Yourself BEA WebLogic Server 7. 0 in 21 Days
Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days
ISBN: 0672324334
EAN: 2147483647
Year: 2002
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net