Tutorial :View dynamic code in Visual Studio


I generate a dynamic assembly with CSharpCodeProvider, from a C# source saved into a string.

I can run the dynamic code at runtime, but if I pause the execution Visual Studio doesn't show me the dynamic source code in the call stack. It says "External code" and I can't step into that source code.

I think VS can't find PDB or other debug info. Can you help me?


I think that you should change the setting called Enable Just My Code in VS Debugging settings option. Go to Tools->Options. Choose Debugging. Uncheck the check box "Enable Just My Code(Managed Only)". Press OK.


If you are using DynamicMethod, you can use the DynamicMethod Debugger Visualizer.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »