ASP.NET 部分类和附加到进程
我使用的是 Visual Studio 2010 Ultimate,并且使用的是带有 IIS6.0 的 Windows Server 2003。我可以很好地附加到我的 w3wp.exe 进程,它甚至可以在不属于分部类的任何 DLL 上命中断点。
符号不会加载部分类(即后面的 MyPage.aspx.cs 代码),我需要调试它的那部分。如何获取要加载分部类的符号,从而在附加到进程时对其进行调试?
其他一些细节:我发布了我的网站(它是一个 ASP.NET 2.0 站点),该网站带有“使用固定命名和单页程序集”复选框,该复选框仅为后面的每个 aspx.cs 代码创建一个 .dll,但没有它的 .pdb 版本。还有其他部署方式,例如单个 .dll 文件。那会有帮助吗?
I am using Visual Studio 2010 Ultimate and I'm on Windows Server 2003 with IIS6.0. I can attach to my w3wp.exe process just fine and it even hits breakpoints on any DLL that is NOT in a partial class.
The symbols won't load for a partial class (i.e. MyPage.aspx.cs code behind) and I need to debug that part of it. How do you get the symbols to load for a partial class and thus debug it while attached to process?
Some other details: I publish my website (its an ASP.NET 2.0 site) which is with "Use Fixed naming and single page assemblies" checkbox which just creates a .dll for each aspx.cs code behind but no .pdb version of it. There are other ways to deploy like a single .dll file. Would that help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,在我发布这篇文章后,我尝试了一些东西并找到了自己的答案。在发布对话框中还有另一个复选框“发出调试信息”。如果您在发布过程中检查,则 .pdb 文件将被“发送”到您的 bin 目录中,其中包含部分类的每个文件,因此现在在附加到进程时将加载符号。
Ok, so right after I posted this I tried something and found my own answer. In the publish dialog box there is another checkbox "Emit Debug Information". If you check that during publish the .pdb files will then be "emitted" to your bin directory for every file including partial classes and thus the symbols will now load when attaching to process.