I founded a group in Kansas City called Make:KC in July 2009 inspired by Make Magazine, their Maker Faires, and the www.makezine.com web site. I started with a MakeKC WordPress blog using WordPress’ free blogging site. Then I registered our www.MakeKC.org domain name and started using Drupal in December 2009. Make:KC is a non-profit organization.
I’ve tried setting up an Integrated Development Environment (IDE) using Eclipse and then NetBeans. Both seem to work well as editors but I was having trouble getting a debugger working that would allow me to step through the PHP commands on our web site. Most of the time these tools have not been needed while using Drupal’s menu style configuration. But I’m wanting to work on developing some modules too.
NetBeans and xdebug
I tried to get debugging working for Drupal sometime last year. At that time I tried Eclipse and NetBeans. I’m spending more time learning to develop in Drupal so I need this to work. It helps to step through commands with a debugger and learn what takes place in Drupal’s code; learning why, how, and when commands are executed.
I’m sure Eclipse is a great IDE to work with but I managed to get debugging working in NetBeans first. I had an older version already on my computer but installed the newer NetBeans 7.0 version today and now I have debugging working on the server side.
I had already downloaded the xdebug program but setting it up to work with the IDE was my problem. I found this web site with some answers I needed: http://2bits.com/articles/setting-up-xdebug-dbgp-for-php-on-debian-ubuntu.html
The section about adding the following instructions to my /etc/php5/apache2/php.ini file seemed to make things work:
zend_extension=/usr/lib/php5/20051025/xdebug.so [debug] ; Remote settings xdebug.remote_autostart=off xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=localhost xdebug.remote_port=9000 ; General xdebug.auto_trace=off xdebug.collect_includes=on xdebug.collect_params=off xdebug.collect_return=off xdebug.default_enable=on xdebug.extended_info=1 xdebug.manual_url=http://www.php.net xdebug.show_local_vars=0 xdebug.show_mem_delta=0 xdebug.max_nesting_level=100 ;xdebug.idekey= ; Trace options xdebug.trace_format=0 xdebug.trace_output_dir=/tmp xdebug.trace_options=0 xdebug.trace_output_name=crc32 ; Profiling xdebug.profiler_append=0 xdebug.profiler_enable=0 xdebug.profiler_enable_trigger=0 xdebug.profiler_output_dir=/tmp xdebug.profiler_output_name=crc32
I need to read the article “Introducing xdebug”, it looks like it has some really good information: http://devzone.zend.com/article/2803-Introducing-xdebug
– About SomeoneKnows –
(c) 2011 Vince Thompson