All Topics  
Debugger

 

   Email Print
   Bookmark   Link






 

Debugger



 
 
A debugger is a computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
 that is used to test and debug other programs. The code to be examined might alternatively be running on an instruction set simulator (ISS)
Instruction Set Simulator

An instruction set simulator is a simulation model , usually coded in a high-level programming language, which mimics the behavior of a mainframe or microprocessor by "reading" instructions and maintaining internal variables which represent the processor's registers....
, a technique that allows great power in its ability to halt when specific conditions are encountered but which will typically be much slower than executing the code directly on the appropriate processor.

When the program crashes, the debugger shows the position in the original code if it is a source-level debugger or symbolic debugger, commonly seen in integrated development environment
Integrated development environment

An integrated development environment also known as integrated design environment or integrated debugging environment is a software application that provides comprehensive facilities to computer programmers for software development....
s.






Discussion
Ask a question about 'Debugger'
Start a new discussion about 'Debugger'
Answer questions from other users
Full Discussion Forum



Encyclopedia


A debugger is a computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
 that is used to test and debug other programs. The code to be examined might alternatively be running on an instruction set simulator (ISS)
Instruction Set Simulator

An instruction set simulator is a simulation model , usually coded in a high-level programming language, which mimics the behavior of a mainframe or microprocessor by "reading" instructions and maintaining internal variables which represent the processor's registers....
, a technique that allows great power in its ability to halt when specific conditions are encountered but which will typically be much slower than executing the code directly on the appropriate processor.

When the program crashes, the debugger shows the position in the original code if it is a source-level debugger or symbolic debugger, commonly seen in integrated development environment
Integrated development environment

An integrated development environment also known as integrated design environment or integrated debugging environment is a software application that provides comprehensive facilities to computer programmers for software development....
s. If it is a low-level debugger or a machine-language debugger it shows the line in the disassembly. (A "crash
Crash (computing)

A crash or in computing is a condition where a program stops performing its expected function and also stops responding to other parts of the system....
" happens when the program cannot continue because of a programming bug
Software bug

A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from behaving as intended . Most bugs arise from mistakes and errors made by people in either a program's source code or its software architecture, and a few are caused by compilers producing incorrect code....
. For example, perhaps the program tried to use an instruction not available on the current version of the CPU
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
 or attempted access to unavailable or protected
Memory protection

Memory protection is a way to control memory usage on a computer, and is core to virtually every modern operating system. The main purpose of memory protection is to prevent a process running on an operating system from accessing memory beyond that allocated to it....
 memory.)

Typically, debuggers also offer more sophisticated functions such as running a program step by step (single-stepping), stopping (breaking) (pausing the program to examine the current state) at some kind of event by means of breakpoint
Breakpoint

A breakpoint, in software development, is an intentional stopping or pausing place in a computer program, put in place for debugging purposes. More generally, a breakpoint is a means of acquiring knowledge about a program during its execution....
, and tracking the values of some variables. Some debuggers have the ability to modify the state of the program while it is running, rather than merely to observe it.

The importance of a good debugger cannot be overstated. Indeed, the existence and quality of such a tool for a given language and platform can often be the deciding factor in its use, even if another language/platform is better-suited to the task. However, it is also important to note that software can (and often does) behave differently running under a debugger than normally, due to the inevitable changes the presence of a debugger will make to a software program's internal timing
Timing

Timing is the spacing of events in time. Some typical uses are:* The act of measuring the elapsed time of something or someone, often at athletic events such as swimming or running, where participants are timed with a device such as a stopwatch....
. As a result, even with a good debugging tool, it is often very difficult to track down runtime problems in complex multi-threaded or distributed systems.

The same functionality which makes a debugger useful for eliminating bugs allows it to be used as a software cracking
Software cracking

Software cracking is the modification of software to remove protection methods: copy protection, trial/demo version, serial number, hardware key, date checks, No-CD crack or software annoyances like nag screens and adware....
 tool to evade copy protection
Copy protection

Copy protection, also known as content protection, copy prevention, or copy restriction, is a technology for preventing the reproduction of copyrighted software, movies, music, and other media....
, digital rights management
Digital rights management

Digital rights management refers to access control technologies used by publishers, copyright holders, and hardware manufacturers to limit usage of digital media or devices....
, and other software protection features.

Most mainstream debugging engines, such as gdb and dbx
Dbx debugger

dbx is a popular Unix-based source-level debugger found primarily on Solaris , AIX operating system, IRIX, and Berkeley Software Distribution systems....
 provide console-based command line interfaces. Debugger front-ends
Debugger front-end

In computer programming, some of the most capable and popular debuggers implement only a simple command line interface ? often to maximize porting and minimize resource consumption....
 are popular extensions to debugger engines that provide IDE integration, animation, and visualization features.

Hardware support for debugging


Most modern microprocessors have at least one of these features in their CPU design
CPU design

CPU design is the design engineering task of creating a central processing unit , a component of computer hardware. It is a subfield of electronics engineering and computer engineering....
 to make debugging easier:
  • hardware support for single-stepping a program, such as the trap flag
    FLAGS register (computing)

    The FLAGS register is the status register in Intel x86 microprocessors that contains the current state of the processor. This register is 16-bits wide....
    .
  • An instruction set that meets the Popek and Goldberg virtualization requirements
    Popek and Goldberg virtualization requirements

    The Popek and Goldberg virtualization requirements are a set of sufficient conditions for a computer architecture to efficiently support system virtualization....
     makes it easier to write debugger software that runs on the same CPU as the software being debugged; such a CPU can execute the inner loops of the program under test at full speed, and still remain under the control of the debugger.
  • In-System Programming
    In-System Programming

    In-System Programming is the ability of some programmable logic devices, microcontrollers, and other programmable electronic chips to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system....
     allows an external hardware debugger to re-program a system under test (for example, adding or removing instruction breakpoints)
  • hardware support for data breakpoint
    Breakpoint

    A breakpoint, in software development, is an intentional stopping or pausing place in a computer program, put in place for debugging purposes. More generally, a breakpoint is a means of acquiring knowledge about a program during its execution....
    s, such as page fault
    Page fault

    In computer storage technology, a page is a fixed-length block of memory that is used as a unit of transfer between physical memory and external storage like a hard disk, and a page fault is an interrupt to the software raised by the hardware, when a program accesses a page that is mapped in address space, but not loaded in physical memory....
     hardware
  • JTAG
    JTAG

    Joint Test Action Group is the common name used for the Institute of Electrical and Electronics Engineers 1149.1 standard entitled Standard Test Access Port and Boundary-Scan Architecture for test access ports used for testing printed circuit boards using boundary scan....
     pins, or the newer Nexus or ETM (Embedded Trace Macrocell from ARM) Debug interfaces


List of debuggers

  • AppPuncher Debugger (used to debug Rich Internet Applications)
  • CA/EZTEST
    CA/EZTEST

    CA/EZTEST was a CICS interactive test/debug software package distributed by Computer Associates and originally called EZTEST/CICS, produced by Capex Corporation of Phoenix, Arizona with assistance from Ken Dakin from England....
     (Cics Interactive test/debug)
  • CodeView
    CodeView

    CodeView was a standalone debugger created by David Norris at Microsoft in 1985 as part of its development toolset. It originally shipped with Microsoft C 4.0 and later....
  • DBG
    Dbg

    DBG is an open source debugger and Performance analysis for the PHP. It supports a Graphical user interface interface as well as a Command line interface....
     — a PHP Debugger and Profiler
  • dbx
    Dbx debugger

    dbx is a popular Unix-based source-level debugger found primarily on Solaris , AIX operating system, IRIX, and Berkeley Software Distribution systems....
  • DDD
    Data Display Debugger

    Data Display Debugger, or DDD, is a popular free software graphical user interface for command-line debuggers such as GNU Debugger, Dbx debugger, JDB, WDB, XDB, the Perl debugger, the Bash , the Python , and the GNU_Make#Modern_versions ....
     (Data Display Debugger)
  • DEBUG — the built-in debugger of DOS and Microsoft Windows
  • Distributed Debugging Tool (Allinea DDT)
  • DDTLite Allinea DDTLite for Visual Studio 2008
  • Dynamic debugging technique
    Dynamic debugging technique

    Dynamic Debugging Technique, or DDT, was the name of several debugger programs originally developed for Digital Equipment Corporation hardware, initially known as DEC Debugging Tape because it was distributed on paper tape)....
     (DDT), and its octal counterpart Octal Debugging Technique
    Octal Debugging Technique

    Octal Debugging Technique, or ODT, was the name of several debugger programs originally developed for Digital Equipment Corporation hardware....
  • Eclipse
    Eclipse (software)

    Eclipse is a multi-language software development environment comprising an Integrated development environment and a plug-in system to extend it....
  • TotalView
    TotalView

    TotalView is a proprietary debugger for C /C++ and Fortran code that runs on Unix-like and Mac OS X systems, on several platforms.It allows process control down to the single thread , the ability to look at data for a single thread or all threads at the same time, and the ability to synchronize threads through breakpoints....
  • GNU Debugger
    GNU Debugger

    The GNU Debugger, usually called just GDB, is the standard debugger for the GNU software system. It is a portable debugger that runs on many Unix-like systems and works for many programming languages, including Ada programming language, C , C++, FreeBASIC, and Fortran programming language....
     (GDB)
  • Parasoft Insure++
    Insure++

    Insure++ is a memory debugger computer program, used by software developers to detect various errors in programs written in C and C++. It is made by Parasoft, and is functionally similar to other memory debuggers, such as Purify and Valgrind....
  • Insight
    Insight Debugger

    Insight is real mode debugger for DOS. It includes Intel 80486 disassembler, 8086 assembler, trace-into and step-over functions, breakpoint handling, and a user-friendly interface....
  • Interactive Disassembler
    Interactive Disassembler

    The Interactive Disassembler, more commonly known as simply IDA, is a commercial disassembler widely used for reverse engineering. It supports a variety of executables for different Central processing units and operating systems....
     (IDA Pro)
  • iSYSTEM – In circuit debugger for Embedded System
    Embedded system

    An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints....
    s
  • Embedded System Debug Plug-in for Eclipse
    Embedded System Debug Plug-in for Eclipse

    Embedded System Debug Plug-in for EclipseEmbedded system debug Plug-ins for Eclipse allow developers to use Eclipse as their integrated development environment when Embedded system#Debugging based on different microcontrollers....
  • Java Platform Debugger Architecture
    Java Platform Debugger Architecture

    The Java Platform Debugger Architecture is a collection of APIs to debugging Java code.* Java Debugger Interface - defines a high-level Java language interface which developers can easily use to write remote debugger application tools....
  • JSwat
    JSwat

    JSwat is a standalone, graphical Java debugger, written to use the Java Platform Debugger Architecture. JSwat is licensed under the Common Development and Distribution License and is freely available in both binary and source code form....
     — open-source Java debugger
  • Nemiver
    Nemiver

    Nemiver is a standalone graphical C and C++ debugger that integrateswell in the GNOME desktop environment.It currently features a backend which uses the well known GNU Debugger....
     — graphical C/C++ Debugger for the GNOME desktop environment
    Gnome

    A gnome is a mythical creature characterized by its extremely small size and wiktionary:subterranean lifestyle. The word gnome is derived from the New Latin gnomus....
  • MacsBug
    MacsBug

    MacsBug is a low-level debugger for pre-Mac OS X Apple Macintosh computers. MacsBug is an acronym for Motorola Advanced Computer Systems Debugger, as opposed to Macintosh debugger ....
  • OLIVER (CICS interactive test/debug)
    OLIVER (CICS interactive test/debug)

    OLIVER was a proprietary testing and debugging toolkit for interactively testing programs designed to run on IBM's Customer Information Control System on IBM's System/360/370/390 architecture....
  • OllyDbg
    OllyDbg

    OllyDbg is a debugger that emphasizes binary code analysis, which is useful when source code is not available. It traces Processor registers, recognizes Function s, Application programming interface calls, switches, Table s, constant s and String s, as well as locates routines from object files and libraries....
  • IBM Rational Purify
  • sdb
    SDB

    SDB can stand for:* GBU-39 Small Diameter Bomb, a small precision-guided munition.* One name of the Yugoslavian secret police.* The acronym for the Society for Developmental Biology....
  • SIMMON
    SIMMON

    SIMMON was a proprietary software testing system developed in the late 1960s in the IBM Product Test, then at Poughkeepsie , New York It was designed for the then-new line of IBM System/360 computers as a vehicle for testing the software that IBM was developing for that system architecture....
     (Simulation Monitor)
  • SIMON (Batch Interactive test/debug)
    SIMON (Batch Interactive test/debug)

    SIMON was a proprietary test/debugging toolkit for interactively testing Batch programs designed to run on IBM's System 360/370/390 architecture....
  • SoftICE
    SoftICE

    SoftICE is a kernel mode debugger for Microsoft Windows. Crucially, it is designed to run underneath Windows such that the operating system is unaware of its presence....
  • Turbo Debugger
    Turbo Debugger

    Turbo Debugger was a machine-level debugger for MS-DOS executables sold by Borland. This tool provided a full-screen debugger with powerful capabilities for watching the execution of instructions, monitoring machine registers, etc....
  • Ups
    Ups (debugger)

    Ups is an open source source code-level debugger developed in the late 1980s for Unix and Unix-like systems, originally developed at the University of Kent by Mark Russell....
     — C, Fortran source level debugger
  • WinDbg
    WinDbg

    WinDbg is a multipurpose debugger for Microsoft Windows, distributed on the web by Microsoft. It can be used to debug user mode applications, drivers, and the operating system itself in kernel mode....
  • Zeta Debugger
  • Valgrind
    Valgrind

    Valgrind is a programming tool for memory debugger, memory leak detection, and performance analysis. The name Valgrind comes from the name of the main entrance to Valhalla in Norse mythology....
  • VB Watch Debugger
    VB Watch

    VB Watch is a Visual Basic programming utility. VB Watch consists of three tools for Visual Basic 6.0: Profiler, Protector and Debugger....
     — debugger for Visual Basic 6.0
  • Microsoft Visual Studio Debugger
    Microsoft Visual Studio Debugger

    The Microsoft Visual Studio Debugger is a debugger that ships along with all versions of Microsoft Visual Studio. This debugger owes much of its feel and functionality to CodeView, a standalone, text-based debugger that shipped with Visual C++ version 1.5 and earlier....


See also


External links

  • How to improve your debugging skills, a good article at IBM
    IBM

    International Business Machines Corporation, abbreviated IBM and nicknamed "Big Blue" , is a multinational corporation computer technology and consulting corporation headquartered in Armonk, New York, New York, United States....
     developerWorks.