NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Conditional Breakpoint Error


Joined: 07 Oct 2009
Posts: 2
Reply with quote
if($avg_set == 2)
{
$avg_set = 0;
$days = 0;
$data[0][] = ($close[$i-1]/$close_on_start - 1)*100;
$data[1][] = $i - $i_on_start;
$data[2][] = $date[$i-1];
}

I set a breakpoint on the line $days = 0; w/ a condition $avg_set == 0 but it never breaks even though it should break every time. The error says "may not trigger because condition is not a valid php code"

what's wrong?
View user's profileFind all posts by bombaSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
I think you need to add a ; to the end. If the expression you put in there evaluates to true then the breakpoint will be triggered. Without the ';' it isn't valid PHP and that's probably what is meant.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 07 Oct 2009
Posts: 2
Reply with quote
I tried adding the ; but it didn't make a difference.
View user's profileFind all posts by bombaSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I don't see any problems with your code:


Quote:
it never breaks even though it should break every time


It's my understanding that it should never trigger because at the line where you set the breakpoint $avg_set can't be of any value but 2. See the if above.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Conditional Breakpoint Error
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic