如何在VS2010中的每个方法中设置断点 [英] How to set a breakpoint in every method in VS2010

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

问题描述

我有一个更大的(c#)WPF应用程序,其中包含 n-classes m-methods 。我想把每一个方法都放在一个断点上,所以每次我按下应用程序中的一个按钮,或者调用任何方法,我希望VS2010中的应用程序能够点击这个断点。我想了解应用程序的流程/进度。

I have a bigger (c#) WPF application with n-classes and m-methods. I would like to place in every single method a breakpoint, so everytime i press a button in my application or any method gets called, i would like the application in VS2010 to hit that breakpoint. I want to understand the flow/progress of the application.

由于我有很多方法,我宁可不在手动放置每个和每个断点。

And since i have many methods i would rather not place manually in every and each of them a breakpoint.

在VS2010解决方案中是否有任何命令或工具位于断点?

Is there any command or tool to place everywhere in my VS2010 solution a breakpoint?

编辑:可能类似于以下插件: http://weblogs.asp.net/uruit/archive/2011/08/04/visual-studio-2010-addin-setting-a-class-breakpoint.aspx

edit: maybe something like the following addin: http://weblogs.asp.net/uruit/archive/2011/08/04/visual-studio-2010-addin-setting-a-class-breakpoint.aspx

edit2 :有一些答案,但没有一个看起来像直接的简单解决方案。还有其他的东西?

edit2: there are some answers but none of them seems like the straight forward easy solution. Anything else?

推荐答案

编辑:仅使用C ++进行测试

我遇到了这篇文章展示了如何在类中每个方法的开头设置一个断点。我已经使用VS 2010进行了测试。基本过程(使用Visual C ++)是:

I came across this article that shows how to set a breakpoint at the beginning of every method in a class. I've tested it with VS 2010. The basic process (when using Visual C++) is:


  1. 转到调试>新建断点>功能上的断点(Ctrl + B)。

  2. 功能字段中插入 MyClass :: * / code>

  3. 这将在断点窗口中显示为单个断点,但一旦 MyClass 的方法被击中,您将在 MyClass 中的每个函数的开头看到一个断点,所有这些都将是孩子在断点窗口中的原始断点。

  1. Go to Debug > New Breakpoint > Breakpoint at Function (Ctrl + B).
  2. In the Function field, insert MyClass::*
  3. This will show up as a single breakpoint in the Breakpoints window, but as soon as one of MyClass's methods is hit, you'll see a breakpoint at the beginning of every function in MyClass, and all of these will be "children" of the original breakpoint in the Breakpoints window.

我想象这与C#一起使用

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

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