[英]Debug C# DLL generated by CodeDomProvider.CompileAssemblyFromFile using VS Express
I have a C# Windows Form myApp.exe program that at run time can compile another C# file, helloWorld, and execute it using reflection method. 我有一个C#Windows Form myApp.exe程序,该程序在运行时可以编译另一个C#文件helloWorld,并使用反射方法执行它。 I use the .NET CodeDomProvider.CompileAssemblyFromFile method in myApp to compile helloWorld into helloWorld.dll. 我在myApp中使用.NET CodeDomProvider.CompileAssemblyFromFile方法将helloWorld编译为helloWorld.dll。
Is there a way I can debug the helloWorld.cs/dll (set breakpoint, singlestepping) using VS Express. 有没有一种方法可以使用VS Express调试helloWorld.cs / dll(设置断点,单步执行)。 If not, is there a way I can debug (singlestepping or thru setting breakpoint) helloWorld within myApp.exe using some defined .NET methods? 如果没有,是否可以使用某些已定义的.NET方法在myApp.exe中调试(单步执行或通过设置断点)helloWorld? Thank you in advance! 先感谢您!
you can set 你可以设置
parameters.IncludeDebugInformation = true;
parameters.CompilerOptions += " /debug:pdbonly";
where parameters is CompilerParameters
then you can debug normally 其中parameters is CompilerParameters
则可以正常调试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.