Ed McLaughlin
Ed McLaughlin

Reputation: 197

Can I set a breakpoint on a changing value?

I want to pause execution only when the value in a variable changes to a specific value. I am using PHPStorm and Xdebug. Can anyone tell me how to do this?

Upvotes: 7

Views: 3216

Answers (3)

SL5net
SL5net

Reputation: 2556

BTW it seems not to work alsways as expected.

"Stops but condition isnt true ... hmmm. strange With the same condition other brakpoints works as expected." http://youtrack.jetbrains.com/issue/WI-21071

Upvotes: 0

gregman
gregman

Reputation: 352

Install breakpoints after press it right. In the window that appears, enter the condition for which you want to stop the debugger. With zend debugger it's work.

Upvotes: 1

linepogl
linepogl

Reputation: 9335

Put a breakpoint and then right click on it (on the red bullet). Select edit and you can enter a condition.

Upvotes: 11

Related Questions