如何调试自定义< Module>注入代码。 [英] How to debug custom <Module> injected code.

查看:70
本文介绍了如何调试自定义< Module>注入代码。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

调试项目时遇到问题。我是一个混合的C#/ C ++解决方案,包含一些纯C#编写的项目,一些纯C ++ dll和一些混合的C#/ C ++程序集。

我的一个项目是后编译器处理器,它捕获一些[归属]成员并将它们放入< Module> .cctor进行某种自动dll注册。



我的问题是我们在其中一个中有一个错误< Module>代码我们无法调试< Module>很容易.c


任何关于在< Module>里面调试代码的方法的建议.cctor ????
$


提前致谢!

I have a problem debugging my Project. I'ts a mixed C#/C++ solution with some pure C# written projects, some pure C++ dlls, and some mixed C#/C++ assemblies.
One of my projects is a post-compiler processor, that catches some [Attributed] members and put them into <Module> .cctor to make some sort of automatic dll registration.

My problem is that we have a bug inside one of these <Module> code and we can't debug <Module> cctor easily.

Any advices to an approach to debug code inside <Module> .cctor????

Thanks in Advance!

推荐答案

您的后编译器处理器是否也更新了PDB中的源映射?

Does your post-compiler processor also update the source mappings in the PDB?

如果没有源映射,调试会变得更加困难,但仍然可以实现,但您可能必须禁用"Just My"代码" ;.您可以在断点窗口中没有源/源映射的方法中添加断点(
将需要输入完整的类型和方法名称)。您还可以添加断点并逐步执行反汇编窗口中的代码,但如果您不熟悉它,则很难遵循。

Debugging gets more difficult without the source mappings but should still be possible, though you may have to disable "Just My Code". You can add breakpoints in methods you don't have source/source-mappings for from the breakpoints window (you will need to enter the full type and method name). You can also add breakpoints and step through the code from the disassembly window, but this can be hard to follow if you are not used to it.


这篇关于如何调试自定义&lt; Module&gt;注入代码。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆