开发者

Can you make Netbeans+Xdebug break after a given number of hits?

So I have an issue with some PHP code, and I'm not a pro at PHP. Still, I managed to know where the issue is from, and now I want to see exactly what happens in an iteration, under netbeans. Then I will have to compare this to a similar result in vs2010 (C# stuff).

My problem is, the issue happens at the 300ish iteration, and in vs2010, I can break only after 300 hits if I want. Is it possible to do the same thing with Netbeans+Xdebug?

Otherwise it's gonna be a long and boring afternoon of F8 xD

开发者_运维技巧

Thanks.


Put an if conditional into your code where you would like to place a breakpoint, like this:

if ($someLoopVariable >= 300)
{
  "doNothing"; // make this line a breakpoint
}

Did I answer your question, or badly misunderstood it?


As of NetBeans 8.1 there is not a way to do this in the PHP debugger. However using other languages in NetBeans this feature exists. To do a conditional breakpoint right click on a break point and select properties to set conditions in other languages; properties is grayed out when debugging PHP. See the following open case in NetBeans bugzilla report Bug 132066 - Implement conditional breakpoints . Please vote for this feature if you are interested. The more votes, we might get this implemented.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜