/ASSEMBLYDEBUG (Add DebuggableAttribute)
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
/ASSEMBLYDEBUG emits the DebuggableAttribute attribute with debug information tracking and disables JIT optimizations. This is the same as specifying the following attribute in source:
/ASSEMBLYDEBUG:DISABLE emits the DebuggableAttribute attribute but disables the tracking of debug information and enables JIT optimizations. This is the same as specifying the following attribute in source:
[assembly:Debuggable(false, false)]; // same as /ASSEMBLYDEBUG:DISABLE
The default is to not emit the DebuggableAttribute attribute.
DebuggableAttribute can also be added to an assembly directly in source code. For example,
In Visual C++ .NET 2003 and later, it is necessary to explicitly specify that a managed image be debuggable. Using /Zi alone is not sufficient.
Other linker options that affect assembly generation are:
Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
Click the Linker folder.
Click the Debug property page.
Modify the Debuggable Assembly property.
- See AssemblyDebug.