Visual Studio 08:设置文件级断点?
我有一个 13.4K LOC 的文件。我想设置一个断点,如果调用文件中的任何方法,就会触发该断点。这可能吗? (我自己检查并标记它们将是一个巨大的痛苦。)
I have a file with 13.4K LOC. I would like to set a breakpoint that will be hit if any of the methods in the file are called. Is this possible? (Going through and marking them all myself would be a huge pain.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以编写 Visual Studio 宏以在文件中每个方法的开头添加断点。
宏看起来是这样的:
为了从长远来看解决问题,您可能会考虑将代码重构为更容易处理的更小的单元。
You can write a Visual Studio macro to add a breakpoint at the beginning of each method in the file.
A macro would look something along the lines of this:
To solve the problem in the long run you might consider refactoring your code into smaller units that can be handled more easily.