CodeView (cv.hlp) (Table of Contents; Topic list)
Set Breakpoints
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     A "breakpoint" is a source line or instruction in the program at
     which program execution temporarily stops. Use breakpoints to
     examine the key values (for example, program variables or
     registers) at different locations in your program. CodeView
     provides commands for setting, removing, and editing breakpoints.
 
     To set or clear a breakpoint, choose the Set Breakpoint command
     from the Watch menu or double-click the line with the left mouse
     button. In the command window,
 
        ■ To enter a breakpoint, enter the Breakpoint Set (BP)
          command
 
        ■ To clear a breakpoint, enter the Breakpoint Clear (BC)
          command
 
     If you want to bypass breakpoints without removing them, you can
     temporarily disable them, then reenable them when you want to
     use them again. To disable or enable breakpoints, choose the
     Edit Breakpoints command from the Watch menu. In the
     command window,
 
        ■ To disable a breakpoint, enter the Breakpoint Disable (BD)
          command
 
        ■ To enable a disabled breakpoint, enter the
          Breakpoint Enable (BE) command
 
     Limitations on Breakpoints with Packed Files
 
     If you are debugging programs that have been linked with the
     /EXEPACK option, exercise caution in setting breakpoints. With
     packed files, it is difficult to ensure the accuracy of a
     breakpoint's absolute address.
 
     When debugging packed files, observe the following precautions:
 
       ■ Do not set any breakpoints prior to the main source level of
         the program (for example, in run-time startup code).
 
       ■ Execute your program to the main source level before setting
         any breakpoints (that is, execute through the startup code).
 
         To execute through the startup code in C and FORTRAN programs,
         use the command
 
              G main
 
         You can also start the debugging session in Source mode, then
         execute the Program Step (P or F10) command to execute the
         startup code. You can then debug normally.
 
     Limitations on Breakpoints with Window Procedures
 
     If you are debugging two or more applications or DLLs that share
     names for certain window procedures (such as MainWndProc), you can
     only refer to the procedure by the name that is defined in the
     first application or DLL that was loaded.
 
     See also: Windows Breakpoint Messsage (WBM)
                                    -♦-