# MSVC_DEBUG_INFORMATION_FORMAT

Added in version 3.25.

Select debug information format when targeting the MSVC ABI.

The allowed values are:

`Embedded`

  Compile with `-Z7` or equivalent flag(s) to produce object files with full symbolic debugging information.

`ProgramDatabase`

  Compile with `-Zi` or equivalent flag(s) to produce a program database that contains all the symbolic debugging information.

`EditAndContinue`

  Compile with `-ZI` or equivalent flag(s) to produce a program database that supports the Edit and Continue feature.

The value is ignored on compilers not targeting the MSVC ABI, but an unsupported value will be rejected as an error when using a compiler targeting the MSVC ABI.

The value may also be the empty string (`""`), in which case no debug information format flag will be added explicitly by CMake.

Use `generator expressions` to support per-configuration specification. For example, the code:

    add_executable(foo foo.c)
    set_property(TARGET foo PROPERTY
      MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>")

selects for the target `foo` the program database debug information format for the `Debug` and `RelWithDebInfo` configurations.

This property is initialized from the value of the `CMAKE_MSVC_DEBUG_INFORMATION_FORMAT` variable, if it is set. If this property is not set, CMake selects a debug information format using the default value `$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>`, if supported by the compiler, and otherwise `$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>`.

Note

This property has effect only when policy `CMP0141` is set to `NEW` prior to the first `project()` or `enable_language()` command that enables a language using a compiler targeting the MSVC ABI.