Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

/ASSEMBLYDEBUG (Add DebuggableAttribute)

/ASSEMBLYDEBUG[:DISABLE]

/ASSEMBLYDEBUG emits the DebuggableAttribute attribute with debug information tracking and disables JIT optimizations. This is the same as specifying the following attribute in source:

[assembly:Debuggable(true, true)];   // same as /ASSEMBLYDEBUG

/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,

[assembly:Debuggable(true, true)];   // same as /ASSEMBLYDEBUG

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:

To set this linker option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.

  2. Click the Linker folder.

  3. Click the Debug property page.

  4. Modify the Debuggable Assembly property.

To set this linker option programmatically

Community Additions

ADD
Show:
© 2015 Microsoft