Recent Topics

1 Apr 02, 2009 17:36    

Hello, I'm new to programming in PHP and I am trying to develop plugins to extend the B2evolution for my LAN Party site that I have recently created. The first plugin I'm developing is a simple countdown timer, although it has been created before.

I'm starting small and getting bigger from there. But my first issue is debugging, all my php books and such show how to include into the code a way to dump errors when they are run but I was wondering if there was a PHP IDE that included a debugger? As when I am having trouble I end up using comments to block off functions and debug it set by step.

So any suggestions are appreciated.

2 Apr 04, 2009 22:15

Not sure what exactly you're after, but I debug plugins in a couple of different ways. One really easy one is to echo out the value of something if that is all I need. Like this:

if( is_logged_in() ) {
echo 'parameter whatever is: '.$whatever.'<br />';
}


It breaks the page because it gets all mad about output starting before something that is supposed to be first, but so what: it's development and I'm the only one seeing it. You can get really fancy with it if you like and dump an array with this:

echo '<pre>';
print_r( $your_array );
echo '</pre>';

Even cooler is to use the message maker thingie that b2evolution provides, like this:

$this-msg( '<pre>'.var_export( $whatever, true ).'</pre>', 'note' );

Hope it helps a wee bit!

4 Apr 05, 2009 09:50

I use Text Mate with all of it's included bundles.

It corrects me relentlessly

5 Apr 05, 2009 10:08

I just bookmarked the first link slamp provided so I can make my notepad++ be reason enough to re-install wamp :)

6 Apr 05, 2009 10:14

If you are not using MSWin, try [1] Bluefish and [2] Quantra+
If you are using MSWin, try [1] jEdit and [2] EmEditor

Usually you'll have to find the appropriate plugins, but if I read correctly, Bluefish and Quantra+ provides it as built-in.


Form is loading...