### Limitations when Debugging Visual C++ Programs

Note: This section applies only to programs being debugged on Windows NT.

You can debug C and C++ programs compiled with the Microsoft Visual C++ compiler, provided you have compiled and linked your program with the appropriate options. The following limitations apply when debugging such programs:

Enumerated types: Enumeration member name information for enumerated types in C programs compiled with Visual C++ is not shown in monitors that display variable contents, such as the Local Variables monitor. This information is available for C++ programs, however. The following shows a code fragment with enumerated types, and the values displayed in the Local Variables monitor of the debugger:

    typedef enum { One=1, Two, Three} TypeX;
    TypeX a=One;
    TypeX b=Two;
    TypeX c=Three;

If the program is compiled as a C program with Visual C++:

    a: 1
    b: 2
    c: 3

If the program is compiled as a C or C++ program with IBM C and C++ Compilers, or a C++ program with Visual C++

    a: 1 /* One */
    b: 2 /* Two */
    c: 3 /* Three */

Constants: A statement such as `const int i = 42;` in a Visual C++ program does not generate any debug information for the variable i. Therefore the debugger does not display any value for it. The IBM C/C++ compiler does generate information for this symbol.

Namespaces: You cannot debug Visual C++ namespaces because the Visual C++ compiler does not generate the necessary debug information for namespaces in the executable.

Debug a Microsoft Visual C++ Program