NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[fixed] Conditional breakpoint behaviour


Joined: 18 Apr 2008
Posts: 3
Reply with quote
Hi All,

I have a problem with conditional breakpoints that's driving me nuts! I've set the following conditional breakpoints and have the same problem with both of them (I'm debugging vTiger here btw)...

strlen($value['date_start']) > 1
key($value['date_start'])=='2008-04-30'

These are all set as "Expression True Global" breakpoints, but when I run in debug, PhpED is inserting a file Location, in my case EditView.php(0), which overwrites the Global setting, and none of these breakpoints end up getting triggered.

If I insert a normal breakpoint in EditView.php and look at the values of $value['date_start'] and key($value['date_start']) I can see that they are set and definitely should have triggered the breakpoints, but they don't - I'm assuming because they're set at (0) and not a real line number.

vTiger is a hideously complicated system and at the risk of sounding melodramatic, if I can't get PhpED's conditional breakpoints working, I think I'm going to have to try Zend or one of the other IDEs, which is a shame as I was just getting to like it!

I'm quite new to PHP, PhpED and vTiger, so any help or ideas much appreciated.

TIA,

Russ.
View user's profileFind all posts by redkinsSend private message
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
I suspect the problem is that you are using functions in your conditions; I doubt if using functions in conditions are supported. I have only used simply variable comparisons before, and they work fine. So, you will likely have more success creating some temporary variable and then using that in your comparison. For example:
Code:
$date_start_len = strlen($value['date_start'])

and then set the condition to
Code:
$date_start_len > 1

And the same for the use of the key() function.

I hope this helps Wink

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
I doubt if using functions in conditions are supported

they are supported.
we'll check what's up if redkins provides a sample of code to play with. (even will try by ourselves)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 18 Apr 2008
Posts: 3
Reply with quote
Hi Dimitri,

I'm happy to provide code, but I'm not sure what would best help you diagnose the problem. The code I'm trying to debug (vTiger, which is based off SugarCRM) has hundreds (if not thousands) of pages and modules and it's not somethig I wrote myself. It includes Smarty templates and Pear among other things. It is open source, so you could download and install it yourself, but if not, maybe you could give me a hint as to which code I could post that might aid diagnosis.

Thanks,

Russ.
View user's profileFind all posts by redkinsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
issue is fixed in build 5238

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Possible stupid question


Joined: 18 Apr 2008
Posts: 3
Reply with quote
Apologies if this is a dumb question, but how/where can I get the fix?

Thanks,

Russ.
View user's profileFind all posts by redkinsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
just log into the web site using your account and you'll see My Products link on the left. That's where all the most recent versions of the products are.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[fixed] Conditional breakpoint behaviour
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