在调用堆栈条件断点 [英] Conditional Breakpoints on Call Stack

查看:85
本文介绍了在调用堆栈条件断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以指定在Visual Studio 2010中的断点击中只有调用方法调用堆栈满足一些特定的条件?例如,而最有可能的,方法名。

Is it possible to specify a breakpoint in Visual Studio 2010 that hits only if the calling methods up the call stack meet some specific condition? For example, and most likely, method name.

我的理想寻找在Visual Studio中的解决方案本身,如条件断点,但我会满足于试验方法名字了代码并且具有编码的断点堆栈。

I am ideally looking for a solution in Visual Studio itself such as the conditional breakpoint, but I'll settle for testing method names up the stack in code and having a coded breakpoint.

我试图做到的,是切出从特定的来电者的电话。

What I'm trying to achieve is to cut out calls from a specific caller.

推荐答案

右键单击该断点,选择条件,使用这样的:

Right click the breakpoint, choose "Condition" and use something like this:

new System.Diagnostics.StackTrace().ToString().Contains("YourMethodName")

这篇关于在调用堆栈条件断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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