隐藏code从DLL在调试 [英] Hiding code from a DLL while debugging
问题描述
我已经创建了一个库类项目一个DLL的一些类。而添加此DLL作为参考在另一个项目和调试,在一步一步去或者上课的时候返回异常显示从类code。
I've created a DLL with a Class Library Project with some classes. While adding this DLL as a reference in another projects and debugging, when going step by step or when the class returns an Exception the code from the class is shown.
我如何隐藏的?我想除了要显示在课堂教学,而不是内部并允许看到人的code。而分步调试时,我想要做的方法,而steping内部的方法的code。
How can I hide this? I want the exception to be shown on the class instruction, not inside and allowing to see al the code. And when debugging by steps, I want to do the methods without steping inside the code of the method.
如果您通过 str.Split步骤就像()
为例。你看不到code和所有步骤。你只看到该行的错误或跳转到下一个。
Just like if you step through str.Split()
, for example. You don't see the code and all the steps. You just see the error on that line or jumps to the next one.
例如:
Dim myObj As New myClass.SomeObj()
myObj.MyMethod()
我不希望在的MyMethod
的code中显示。
I do not want the code inside MyMethod
to be shown.
推荐答案
添加指定的方法在 DebuggerStepThrough
属性为prevent跨进。如果有异常occures,调试器打破在方法调用,该方法不进去。 请参阅MSDN
Add on the specified method a DebuggerStepThrough
attribute to prevent step into. If an exception occures, the debugger breaks at the method call, not inside the method. See MSDN
这篇关于隐藏code从DLL在调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!