How to debug print the flow of the executable of the 3rd party
I have a third party library(Assembly) used开发者_运维技巧 in the project. I want to know if there is a way to print out all its method entry information?
You will most likely need to use reflection if you want to do this programmatically: MSDN
Otherwise, you could try disassembling the library with Red Gate Reflector.
Edit:
Reflection does not allow you to change anything about the methods. If you are wanting to print out the methods as you originally asked, you can retrieve:
- Method name
- Method return type (void, or otherwise)
- Method parameters and return types
The only way you would be able to change (or override
) a method is if the method is defined as virtual
. You can determine if a method is overrideable through reflection as well: MethodBase.IsVirtual.
You are mostly dependent on how much has been exposed by the 3rd party. As dboarman suggested, you can use reflection [or the Reflector tool].
You can also use Debug View. http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
Using DebugView, you can get a bunch of text that the 3rd party may [or may not] have written. Mostly good developers instrument the code.
精彩评论