NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugger and breakpoints
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
The debugger doesn't stop at this break-point:

Code:

<?php

   $OrderBy = "asdf";

   if(ereg("[^0-6]", $OrderBy))
      $OrderBy = 'bananas';  //  (SET BREAKPOINT HERE)

   echo "$OrderBy";   // = bananas, but we didnt break!!

?>


but DOES stop at this one
Code:

<?php

   $OrderBy = "asdf";

   if(ereg("[^0-6]", $OrderBy))
   {
      $OrderBy = 'bananas';   // (SET BREAKPOINT HERE)
   }
   echo "$OrderBy";   // = bananas, and we breaked

?>


the only difference is the addition of curly braces { }

Is this a bug?

Joe
#
View user's profileFind all posts by joebSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
dbg-2.14 and all earlier versions, show execution marks (little blue dots on the left gutter) sometimes incorrectly making you think that a breakpoint can be set on them.
It's been fixed in dbg 2.16 which comes with phped 3.3.

Anyways, nothing has changed in PHP Interpretor itself and it still can execute IFs without curly braces as a single statement only


Last edited by dmitri on Thu Feb 12, 2004 10:23 am; edited 2 times in total
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 15 Nov 2003
Posts: 118
Reply with quote
ok, im glad thats cleared up, i was pulling my hair out trying to figure what was happening!!

joe
#
View user's profileFind all posts by joebSend private message


Joined: 09 Dec 2003
Posts: 92
Reply with quote
It seems you cannot set break points on lines as "function foo() {" either, i. e. on the "function itself". Instead you have to choose the first statement inside the function.

Is that correct and due to the same php behaviour?

mp.
View user's profileFind all posts by mpSend private message
Debugger and breakpoints
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