### When You Start Debugging

The first time you debug a program, the debugger opens the following windows:

- A Source window. This window contains the source code (or disassembly code, if the program was compiled without debug information) for the main function of your program.
- The Session Control window. Use this window to access other windows, to control the debugging of threads and functions, and to perform various debugger commands.
- When the program being debugged (the "debuggee") is running locally on Windows and OS/2, the debugger also raises a Debug Application window, which is a text-mode window. This window is a text mode window, and is used for any console input and output your program may require. For programs using a graphical user interface (such as the User Interface classes of IBM OpenClass), the Debug Application window usually stays blank throughout the debugging session.

The debugger behavior at startup depends upon the dominant language, as specified by the CPP_DBG_LANG environment variable.

CPP_DBG_LANG=CPP
  The debugger runs up to the start of main. If you checked the Debug program initialization check box on the Startup dialog, the debugger starts at the first line of disassembly code in your program. Use this check box when you want to debug initialization code such as the constructors for class objects declared at global scope.

As you step through or run your program, the debugger may raise additional Source windows for other object files that are executed. If you exit the debugger, then debug the same program later, these other windows appear on reload, provided you saved program profile information.

When you start debugging a program for the first time, no breakpoints are set and no variables or expressions are being monitored. During the debug session, you may set breakpoints, or add variables or expressions to a monitor. When you exit the debugger, these breakpoints, variables and expressions are saved in the program profile, and will be activated the next time you debug this program