I followed these instructions to add IL offsets to Silverlight stack traces. This works great when building in DEBUG mode however our production/qa build process compiles e
The DebuggableAttribute
is added by the compiler to control the JIT code generation.
In fact, code gets generated differently when it is supposed to be debuggable and certain optimizations do not take place.
If you need to tweak the assembly generated, you need to dump the IL, alter the attribute and recompile it back via: ildasm creates a human readable IL source that can be altered by a convetional text editor, while ilasm is used to recompile it back.
This process can be automated in your build. Just remember that you are messing up with something generated by the compiler and not supposed to be touched.
Important: the assembly needs to be signed again in case strong name and/ir authenticode is used.