在局部变量值上设置Visual Studio(有条件)断点 [英] Set Visual Studio (conditional) breakpoint on local variable value

查看:226
本文介绍了在局部变量值上设置Visual Studio(有条件)断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试调试一种方法,其中包括将项目添加到方法本地的列表中。



然而,列表中经常列出大小被设置为零中游。我想设置调试器在列表大小变为零时中断,但我不知道如何,并且会感谢任何关于如何执行此操作的指针。



解决方案

为什么不使用条件断点?



a href =http://blogs.msdn.com/saraford/archive/2008/06/17/did-you-know-you-can-set-conditional-breakpoints-239.aspx =noreferrer> http://blogs.msdn.com/saraford/archive/2008/06/17/did-you-know-you-can-set-conditional-breakpoints-239.aspx


I'm trying to debug a method which among other things, adds items to a list which is local to the method.

However, every so often the list size gets set to zero "midstream". I would like to set the debugger to break when the list size becomes zero, but I don't know how to, and would appreciate any pointers on how to do this.

Thanks.

解决方案

Why not use conditional breakpoints?

http://blogs.msdn.com/saraford/archive/2008/06/17/did-you-know-you-can-set-conditional-breakpoints-239.aspx

这篇关于在局部变量值上设置Visual Studio(有条件)断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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