我如何在每一个访问类设置断点 [英] How do I set a breakpoint on every access to a class

查看:156
本文介绍了我如何在每一个访问类设置断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在与第三方系统,尤其是高度可配置的系统,动态加载提供商,控制器,组件等,有时我只是想知道某个对象或类被访问时工作。通常情况下,我会放置一个断点在我的源代码的任何潜在线(讨厌,但它的作品),但如果源不可用:

When working with third party systems, especially very configurable systems that dynamically load providers, controllers, components and so on, I sometimes just want to know when a certain object or class is accessed. Normally, I'd place a breakpoint on any potential lines in my source (a nuisance, but it works), but if source is not available:

我如何可以指示Visual Studio 2010的最终打破任何和每次访问给定类?

How can I instruct Visual Studio 2010 Ultimate to break on any and each access to a given class?

<子>注:据我的经验去,这通常是不可能的,但我希望看到它证实

推荐答案

您可以点击调试>新建断点>断点功能的。 按Ctrl-B 带给你那里直接。这将让你打破在一个特定的功能。

You can click Debug > New Breakpoint > Breakpoint at Function. Ctrl-B brings you there directly. It'll allow you to break at a specific function.

在调试过程中,您可以在断点窗口看到该方法是否被发现,将被击中(红色圆形图标)或不(白色圆圈图标,为残疾断点),就像正常的断点。

During debugging, you can see in the Breakpoints-window whether the method is found and will be hit (red round icon) or not (white with circle icon, as of disabled breakpoint), just as with normal breakpoints.

这篇关于我如何在每一个访问类设置断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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