C1XX -debugBreak


This option has no arguments. It is -debugBreak only.

This option is not recognised on the CL command line, but can be passed to C1XX through the CL /d1 option, giving debugBreak as its argument.


The -debugBreak option directs C1XX to break to the debugger (i.e., execute an INT 3) during the compiler’s initialisation. It is arguably reasonable to say that the break marks the end of the compiler’s initialisation or at least of the first stage of initialisation. Command-line options have been retrieved, some conflicts resolved, and some options have even been acted on, but the bulk of the compiler’s work, even before loading any source files, is yet to start.

An obvious use for this option is for problems whose circumstances of occurrence are known well enough to suggest the relevance of particular code or data in the compiler. The initial break provided by the -debugBreak option provides an opportunity to set breakpoints at the sites of interest, resume execution and wait for one or more breakpoints to trigger.

A different break is provided by the __compileBreak keyword. Neither the option nor the keyword is documented, presumably on the basis that Microsoft’s compiler ought not be (or cannot usefully be) debugged by anyone except Microsoft’s own programmers.