我可以标记一个类,不是我的code,以便调试步骤了吗? [英] Can I mark a class as not my code so the debugger steps over it?

查看:188
本文介绍了我可以标记一个类,不是我的code,以便调试步骤了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经彻底测试一个工具类,而我不希望VS调试器进入它的任何方法。我想我已经听到了一个方法,以纪念的东西是不是我的code,使只是我的code 调试器设置导致调试器来逐步通过这些方法要求,但对我的生活我不记得class属性是(我也不能顺利谷歌为它)。

I have a utility class that has been thoroughly tested, and I do not want the VS debugger to step into any of its methods. I think I have heard of a way to mark something as not my code so that the Just My Code debugger setting causes the debugger to step over these method calls, but for the life of me I cannot recall what the class attribute is (nor can I successfully Google for it).

我知道,我可以单独该类到自己的组装和建造它在释放模式来缓解这个问题,但我想步入一些组件(我想保持这个类的地方是)

I know that I could separate this class into its own assembly and build it in release mode to alleviate the issue, but I would like to step into some of the assembly (and I would like to keep this class where it is).

这是可能的,或者是我做梦了这个选项?

Is this possible, or was I dreaming up this option?

更新

我做了两个选项一些测试(DebuggerStepThrough和DebuggerNonUser code),而且我发现有的时候DebuggerNonUser code行为完全一样的框架只是我的$ C $ ç启用/禁用。该 DebuggerStepThrough 属性始终会导致调试器跳过标有该属性的部分。出于一致性的缘故,我就跟着DebuggerNonUser code。

I did some testing with the two options (DebuggerStepThrough and DebuggerNonUserCode), and I found that DebuggerNonUserCode behaves exactly the same as the framework when having Just My Code enabled / disabled. The DebuggerStepThrough attribute always causes the debugger to skip the section marked with the attribute. For consistency's sake, I went with DebuggerNonUserCode.

推荐答案

您正在寻找的<一个href="http://msdn.microsoft.com/en-us/library/system.diagnostics.debuggernonuser$c$cattribute.aspx">DebuggerNonUser$c$c属性。

这篇关于我可以标记一个类,不是我的code,以便调试步骤了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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