CSC/ECE 517 Fall 2009/wiki1b 1 db

From Expertiza_Wiki
Revision as of 13:44, 20 September 2009 by Ncsueng (talk | contribs)
Jump to navigation Jump to search

Debugger is a computer tool (or program) used to find and fix bugs in other computer programs. It is generally used to determine the position of a program when a program 'crashes' or cannot continue because of a bad instruction or a memory access to a location not allowed for the current running program. With the advances of debuggers, they are now part of most IDEs (Integrated Development Environments) and can now do much more including executing a program a step at a time, stopping the program at a predetermined breakpoint and track values in variables as they change.

History

When computer programming first appeared, so did the need to debug them. Although static programming errors can be easily detected by analyzing the code syntactically, runtime errors are much harder to find and may could potentially depend on the running environment.

Control Flow Debugging:

Programming errors may be caused by incorrect control flow or data flow. Debuggers make use of conditional breakpoints and single stepping to allow the programmer to test the flow of the program.

Other programming languages, such as Eiffel, provide build in support for debugging through the use of conditional assertions. This differs from conditional breakpoints in that it is checked only at specific program execution states such as before a method invocation or after a method exits.

Data Observation Debugging:

Memory inspection and Data Structure Display provide a way for programmers to peek into memory during the execution of a program. The amount of information may be large, so some debuggers provide a way of filtering that information and displaying only a subsection of all memory state.

Data breakpoints combines control flow debugging with data observation by breaking (or stopping) the running program when a particular even occurs to a change in a variable.