使用 Zend Studio / Eclipse 进行调试
是否可以调试 PHP 脚本,使其一直运行直到表达式为真?
例如,我想知道$a什么时候变成某个值。我不想一直按下step into并等待变量$a更改它的值。
Is it possible to debug PHP scripts so that it keeps running until an expression is true?
For example, I want to know when $a becomes a certain value. I don't want to keep pressing step into and wait until the variable $a changes the value to it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决办法是设置一个断点,右键单击它并为其设置条件。
但是,没有全局断点,您必须为放置的每个断点指定一个位置。因此,如果您想知道值在哪里发生变化,则无法设置任何全局条件,因为它们会太消耗 CPU。
The solution is to set a breakpoint, right click on it and set a condition for it.
However, there are no global breakpoints, you must specify a location for every breakpoint you put. So, if you want to know where a value changes, you can't set any global conditions as they would be too CPU consuming.