Share via


Debugging Glossary

Terms and Definitions related to debugging, debuggers and Visual Studio's implementation of a debugger. Currently italicized words are used to indicate terms that are defined elsewhere in the glossary.

 

Break Mode - The state Visual Studio is in when a breakpoint has been hit. The program being debugged is in Break State.

Break State - This refers to a program that has been stopped in it's tracks, usually due to a breakpoint being hit. See Breakpoint for more details.

Breakpoint - Arguably the most fundamental concept of any debugger. It is informally known by some "programmers" as a "stoppy place". A breakpoint is most typically a point in a program at which the programmer has indicated that it should stop running, but without exiting or terminating the program. When a program is in this state all sorts of information about it's current state can be examined and even modified to some extent. When the programmer is done examining it, the program can be told to continue right where it left off.

Example: Let's say you're creating a program that is supposed to display a window with a message in it when a certain button is pressed. Unfortunately, when you run it and press the button, the window doesn't display. To figure out what might be wrong, you can examine your source code, basically walking through the code like you were a very slow computer. An easier and less time consuming method would be to tell the debugger to set a breakpoint on the code that is supposed to run when the button is pressed. Then you run your program under the control of the debugger. You press the button and your program should stop at the place you set the breakpoint. If it doesn't stop, then your code isn't being run when the button is pressed. If it does, you can examine the state of variables you might have and even step through your program line by line to see what is happening.

Debugger - From the wikipedia: A computer program that is used to debug (and sometimes test) other programs. Visual Studio ships a debugger that is integrated with the rest of the development environment.

Debugging Information - In Visual Studio, this term typically refers to Symbol Files

Edit and Continue - A feature of a debugger that allows the user to edit a program while it is in Break State, and then build those changes into the running program. This feature can drastically cut down the amount of time it takes to debug and fix a problem.

First Chance Exception - Also known as a Thrown Exception. A typically unexpected error that occurs in a running program that typically would mean termination of the program if left unhandled. When a First Chance Exception occurs, the running program is given the opportunity to handle it. The program can either try to gracefully recover, display an error, respond with further exceptions, or a multitude of other possibilities. If the program does not handle the exception in any way, the exception becomes a Second Chance Exception and program termination is imminent.

Just My Code - A phrase introduced by Visual Studio 8.0 that refers to a set of debugging options and behaviors that work together limit the amount of uninteresting source code the debugger makes the user aware of. 

Kernel Debugger - A very low level debugger used to debug the most fundamental aspects of an operating system or platform. Typically, a kernel debugger resorts to using a serial port connection to the computer being debugged since it must be capable of running itself, if the entire target operating system is stopped. Visual Studio does not support kernel debugging.

Local Debugging - The situation referred to when a debugger is running on the same computer that the program being debugged is being run. See Transport, and Remote Debugging.

printf Debugging - A method of debugging that entails modifying your program to output pieces of information intended to help the programmer understand what is happening while a program runs. The term "printf" comes from the method that C language users often used to output text to the screen. The 'f' stands for "formatted". However, the function used to output text to the screen varies widely from language to language and platform to platform. If you've been programming for as long as I have, you likely have much experience with this form of debugging. You may even prefer it over using a debugger to this day. It is very attractive to many programmers, since it requires no additional skills, knowledge, or tools over and above what the programmer currently understands. If you can build a program that does anything, you can debug it using this method. However, taking the time to learn and understand what a separate debugging tool can do for you will typically result in much greater productivity.

Platform - Refers to the computer type or operating system (or CPU type) that a program is intended to be run on. For example, there is

Remote Debugging - Refers to the type of debugging done when the Debugger is run on one computer but is debugging a program running on another computer. There are many ways in which remote debugging scenarios can be achieved. 

Second Chance Exception - See Unhandled Exception.

Symbol Files - A collection (usually quite large) of data that allows a debugger to associate variable names, line numbers, source files, etc to a running program or component. In Visual Studio "symbol files" or "pdb files" (pdb stands for program database) are created when a program is built and usually reside next to the executable file that they are associated with. For example, if you create a program called "MyReallyAwesomeProgram.exe" that was built using Visual Studio, you will end up with a file called "MyReallyAwesomeProgram.pdb". If that file is removed or otherwise unable to be found by the debugger, then debugging your really awesome program will be next to impossible... assuming you haven't resorted to printf debugging.

Tracepoint - A tracepoint is very similar to a Breakpoint with one huge difference. A tracepoint doesn't cause the program to stop running. "Then what's the point?" you may ask. Well, a tracepoint allows you to output a message when the point is hit, and then automatically continue running the program. It is basically a shortcut for: Setting a breakpoint, hitting it, examining variables, then allowing the program to continue running. It is also a much more convenient and powerful way of doing printf Debugging. Visual Studio 8.0 (Whidbey) is the first version of a Microsoft Development tool to support tracepoints.

Transport - A Visual Studio specific term for referring to the mechanism by which the debugger can communicate with a machine running a program to be debugged. The machine on which the program is often the same machine on which the debugger runs. This is often referred to as Local Debugging.

Transport Qualifier - A Visual Studio specific term first introduced in version 8.0. This is a string of text that is used to uniquely identify the computer or machine to which the debugging Transport should be connected.

Unhandled Exception - Also known as an Second Chance Exception. An error that occurs in a running program that has not been successfully addressed by the program. In these cases, program termination usually follows, unless the exception is intercepted by a well-placed debugger.