Install and activate xdebug in MacPorts

First install php5-xdebug:

sudo port install php5-xdebug

Then just add these in your php.ini (probably /opt/local/etc/php5/php.ini), but first verify the file path for zend_extension option:

; NOTE: This line adds the xdebug extension. The macports install will give you the path, 
; or may even add this automatically. Be smart, look for a similar line in your config first.
; (Edit: 06/22/2012)
zend_extension="/opt/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

; General config
;Dumps local variables on exception
xdebug.show_local_vars=On
;Dump server variables
xdebug.dump.SERVER=*
;Dump global variables
xdebug.dump_globals=On
xdebug.collect_params=4;

; Tracing
xdebug.auto_trace=On
xdebug.trace_output_dir=/opt/local/php_traces/
xdebug.show_mem_delta=On
xdebug.collect_return=On

; Profiler
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/opt/local/php_traces

; Debugging. You might need to specify your host with some additional options
xdebug.remote_enable=1

Ref: http://www.littleblackhat.com/blog/2009/02/getting-xdebug-working-on-mac-os-x-with-macports/

You might also like

Solve “mongodb cannot be built while v8 is active” in MacPorts
While updating all the ports of macports I got this error: ---> Configuring mongodb Error: mongodb...
Install MongoDB in Ubuntu 12.04 with PHP driver
Install MongoDB: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo...
Install Doctrine2 with PEAR in MacPorts
Run those commands: sudo /opt/local/bin/pear channel-discover pear.doctrine-project.org sudo /opt/local/bin/pear...
Using MacPorts php from command line
Some time ago I had installed Apache+MySQL using MacPorts in Mac OS X. It was all OK as long as I used...
Leave a comment ?

0 Comments.

Leave a Comment