📜 ⬆️ ⬇️

Troubleshooting xdebug with php version 5.3

Who uses the Netbeans editor for PHP development and the installed version of the interpreter at it> 5.3, probably noticed that during the debugging sessions the variables in the “Variables” editor area are not displayed. As already written by the user @ gray-one here , the beta version of debugger 2.1.0 has been released (the second one is already). For verification, I installed all of this with svn (since up to now macports have only version 2.0.5 without php5.3 support):

# cd /tmp
# svn co svn://svn.xdebug.org/svn/xdebug/xdebug/trunk xdebug
# cd xdebug
# phpize
# ./configure --enable-xdebug
# cp modules/xdebug.so ////


and add a line to your ini-file:
zend_extension="/////xdebug.so"

')
Well, restart the server:
# /opt/local/apache2/bin/apachectl graceful


While beta, sometimes I noticed “Socket exception occured” errors at the end of a debugging session. We use at your own risk :)

ps: thanks to Fragster for the correction

I give an example of a typical netbeans + xdebug setup

UPD: by request I publish xdebug settings for netbeans (although they are full of them in the internet)
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug


The main nuance: for the current project set the flag " Set as main project ". We start debugging through the " Debug / Debug main project " when the plug-in's state is active for firefox (well, or by adding a parameter to the line)

Source: https://habr.com/ru/post/84368/


All Articles