C++ Compiler Options

Compile your C++ programs with the /Ti+ option (to generate debugging information) if you want to be able to debug your program at the source code statement level. You should also consider using the following options:

Option
Purpose
/Tm+
Enable debug memory management support. Use this option if you want to do heap debugging (using the Storage monitor and Check heap when stopping).
/O-
Compiles your program with optimization off. This is the default. (Some optimizations reorder the execution sequence of your program, while others may eliminate expressions whose result is never used. You may find it confusing to debug a program compiled with optimization, because statements may execute in a nonsequential fashion or not at all.)
/Oi-
Compiles your program with inlining off. This is the default.
/DEbug
Use this option with the ilink command when linking objects that were compiled with debug information but are being separately linked. When you specify the /Ti+ option for a source file, the compiler passes the /DE linker option to the linker automatically.


Invoke the Debugger
Debug Heap Use