有没有一个Visual Studio宏来设置一个类中每个方法开始的断点? [英] Is there a Visual Studio macro to set a breakpoint on the start of every method in a class?

查看:113
本文介绍了有没有一个Visual Studio宏来设置一个类中每个方法开始的断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有Visual Studio宏(针对版本2008或2010)在类中的每个方法的开始设置断点?



我已经看到提示参考,但我没有能够挖出一个实际的。

解决方案

你不会我们无法想象,为什么每个方法开始时的断点都会比以前更好一些,而不是仅仅单步执行你的源代码?



<单步。您将最终破坏无处不在,单步提供了向您显示代码路径逻辑流程的额外优势。



您将可能肯定要学习键盘快捷键,但它们可以依赖于您的VS环境设置。查看您的调试菜单中的逐步和步入项目。 (通常,Step Over是 F10 ,Step Into是 F11 。)唯一的区别是,如果当前突出显示的行包含函数调用,Step Into将允许单步通过调用函数中的代码(这可能最像你想要做的),而Step Over将简单地调用函数并停止在当前函数的下一行。 / p>

Is there a Visual Studio macro (either for version 2008 or 2010) to set a breakpoint on the start of every method in a class?

I've seen hints of references, but I've not been able to dig an actual one out.

解决方案

Wouldn't you be better off just single-stepping through your source code?

I can't imagine why a breakpoint at the start of every method would be any better than single-stepping. You're going to end up breaking everywhere anyway, and single-stepping provides the additional advantage of showing you the logical flow of your code paths.

You'll probably definitely want to learn the keyboard shortcut keys, but they can depend on how you have your VS environment set up. Look in your "Debug" menu for the "Step Over" and "Step Into" items. (Normally, Step Over is F10 and Step Into is F11.) The only difference is that, if the currently highlighted line contains a function call, Step Into will allow you to single-step through the code in the called function (this is probably most like what you want to do), while Step Over will simply call the function and stop on the next line in the current function.

这篇关于有没有一个Visual Studio宏来设置一个类中每个方法开始的断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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