NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Alex Parsy -
Number of replies: 18
Hi,

I downloaded and setup NB 6.5 for PHP development and debugging. I had already gone through the learning curve of setting up Eclipse with PDT and xdebug and all working.

I must say the NB experience was much better. Debugging is integrated and I didn't have to go through any special setup with xdebug and my Mac OS X platform as well as canvassing the forums to find answers to my setup issues.

I might still stay with Eclipse simply because I have invested so much time into setting it up with PDT and xdebug and also because I need to learn the Eclipse client platform.

..... But for people starting out with new PHP development effort with moodle who could benefit from out-of-the-box debugging, I recommend starting with NB 6.5. It is easier and a more pleasant experience and you will be up and running in minutes, rather than hours.


J.
Average of ratings: -
In reply to Alex Parsy

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Marc Grober -
For the longest time netbeans was available on a very limited number of platforms (specifically it was not available for OS X) while eclipse easily installed on almost anything.....

Now that it is available for an increased number of platforms it would be nice to have docs on setting up netbeans to do moodle development, from initially install to configuring ssh and cvs access and implementing remote debugging.
In reply to Marc Grober

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Alex Parsy -

I will not be able to put time into this.

But as susbstitude, I started with the screen casts on both PHP editing function as well as the use of debugger.

Then I easily imported moodle source into a project and fired up the debugger to see it in action. It was a pleasent experience.

I suggest people starting fresh, should startup with NeBeans before Eclipse.


In reply to Marc Grober

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
"For the longest time netbeans was available on a very limited number of platforms (specifically it was not available for OS X) while eclipse easily installed on almost anything....."

Netbeans has always been based directly on Java and the Swing widget set, it was available for every platform that Java and Swing was available. Java has been available for Mac OSX for a very long time.

Netbeans PHP support is very nice indeed, especially when combined with the server side debugger.
In reply to Marcus Green

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Marc Grober -
You are absolutely correct but I wonder what led me astray. I'd thought it would be available, but when I went to try and download netbeans there was only a Windows version available... Ahhhh, the fact that I was downloading 1.4 with Netbeans from java.com may have had something to do with it..... now java.com links to netbeans.org for netbeans....

is Netbeans PHP relying on xdebug on the remote server or does it employ something else?
In reply to Marc Grober

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
"You are absolutely correct but I wonder what led me astray." It could be the historical limited number of platforms that Eclipse was available for (thought I think it has always supported the Mac. I tried and tried to like Eclipse but always found it rather confusing and I found the PHP support just added to the peculiarities. But that may just be me, many people swear by Eclipse.

Netbeans has some very nice CSS and JavaScript support.

Yes, the debugging seems to be based around xdebug (well that's how it is workinig for me).




In reply to Alex Parsy

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Ciao John
following your message I met and installed NetBeans 6.5
I have never been able to use PDT even following in detail the marvellous Tim's guide about "Setting up Eclipse for Moodle development"

Thanks for your suggestion about NB.

I am a MacOS X user like you.
I would like to use NB to get support during the development of small hacks on fresh moodle code. (primarily: trace, variables dump and pause/restart)

Which kind of debugger do I need? Server side or client side?
How did you install XDebug?

Thanks in advance and happy new year.
In reply to Daniele Cordella

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You need to add (or uncomment) a line in your php.ini file on the server. On my windows setup this reads as

zend_extension_ts = "C:/apps/xdebug/php_xdebug-2.0.3-5.2.5.dll"
xdebug.remote_enable=1


Of course under a Linux system the path will be different.

It is a bit of a fiddle to setup but once that is done all is sweetness.

You should also investigate the FireBug JavaScript debugger for FireFox which is absolutly wonderful for dealing with JavaScript code.


In reply to Marcus Green

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Ciao Marcus
thanks for your hints.

Happy new year.

I believe I am not able to follow instruction about "Installation From Source" in http://www.xdebug.org/docs/install
Sorry!!
In reply to Daniele Cordella

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
What platform are you running on? Win32, Linux or Mac?
In reply to Marcus Green

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Mac OS X
In reply to Daniele Cordella

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Looks like OSX is not quite as straightforward to get xdebug setup as Win/Lin.
http://www.openkomodo.com/blogs/jeffg/php-leopard-or-how-use-mamp-instead

Average of ratings: Useful (1)
In reply to Marcus Green

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Thanks Marcus for your support.
I tried to follow the instruction provided in http://www.openkomodo.com/blogs/jeffg/php-leopard-or-how-use-mamp-instead
but... without success.triste

I added the xdebug.so as described in the guide. What I have is that if I add the row:
zend_extension=/Applications/MAMP/bin/php5/xdebug/xdebug.so
to my /Applications/MAMP/conf/php5/php.ini
MAMP (apache) doesn't restart.

If I take it off, all works fine.

In my /Applications/MAMP/conf/php5/php.ini (downloaded from http://download.moodle.org/macosx/), zend_extension is already defined as:
zend_extension=/Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so
In reply to Daniele Cordella

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Alex Parsy -

Hi, this is what I have in my Xammp PHP configuration php.ini file.


zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
xdebug.profiler_enable = Off
xdebug.default_enable = On
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_handler=dbgp
# xdebug.remote_port = 9900



seems to work for me.


I start a debug session from NetBeans 6.5 and it kicks up my index.php into my browser and I can navigate through the web application until it hits my breakpoint.


Seems to work. Again I am using Xampp apache.


k.
Average of ratings: Useful (1)
In reply to Alex Parsy

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
By commenting the zend optimization rows
from
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/Applications/MAMP/bin/php5/zend/lib/Optimizer-3.2.2
zend_optimizer.version=3.2.2
zend_extension=/Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so

to

[Zend]
; zend_optimizer.optimization_level=15
; zend_extension_manager.optimizer=/Applications/MAMP/bin/php5/zend/lib/Optimizer-3.2.2
; zend_optimizer.version=3.2.2
; zend_extension=/Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so

and by merging your both suggestions
now I find the xdebug section in the phpinfo() page.
Thank you Marcus and John. sorridente

I go to try to use it, now!!!! cool
In reply to Daniele Cordella

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Andy Hediger -
i did install NetBeans with MAMP/MAMP PRO on OS X yesterday and had similar problems to install xdebug

this excellent post helped: Setting up Xdebug on Mac OS X

thanks to this forum for giving me all the useful tips and hints for NetBeans.
In reply to Andy Hediger

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Ciao Andy
please let me know if netbeans really works fine to you.
On my installation, even with the debugger seen by php, I am still missing the trace and breakpoints features.
Tell me, please, if you find a way to let them work properly.
In reply to Alex Parsy

Re: NetBeans 6.5 for moodle/PHP/debugging is a better experience v.s Eclipse

by sami ft -

Hi everybody

how can I debug my moodle in netbeans in windows?

I need any tools for that?