Xdebug (2.4.0) is not working on NetBeans (8.2) on OSX (10.13.2) using XAMPP (7.0.26-0).
I've just installed all these and just trying out test file, but it shows
“Waiting For Connection (netbeans-xdebug)”
No break points work.
I have these code on php.ini, there is no Additional .ini files parsed
zend_extension = "/usr/local/Cellar/php70/7.0.26_18/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"
xdebug.remote_enable=on
xdebug.remote_host=192.168.0.9
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=On
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
xdebug support => enabled shows when I run php -i on command line.
I read many other thread but no luck so far. Anyone have any suggestions ?
Recently I have learned how too use xdebug and I want to try and install it to the php.ini for apache.
I managed to install php7.0 as apache module and NOT to run it via php-fpm.
As I have seen the following configuration works for php 5.x versions:
[PHP]
extension=/usr/lib/php5/20131226/mailparse.so
zend_extension=/usr/lib/php5/20131226/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300
But it may need some tweak to work for php 7.0 . Do you know how to tweak it?
In the end my configuration on file /etc/php5/apache2/php.ini is:
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300
And worked like a charm.
I need to debug a console script run from within my development VM (because of different machine state).
I'm using Netbeans, and I can debug scripts called from the browser just fine.
How do you achieve this, is this possible?
I tried Debugging php-cli scripts with xdebug and netbeans?, but I think this applies only to running the script locally.
My current xdebug configuration:
[XDEBUG]
xdebug.max_nesting_level=200
xdebug.remote_connect_back=1
xdebug.default_enable=1
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.idekey=netbeans-xdebug
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.collect_params=4
So, following this https://www.adayinthelifeof.nl/2012/12/20/debugging-remote-cli-with-phpstorm/, I found out that you need to specify the remote host.
Xdebug must know where to send the data to.
I ended up editing my xdebug configuration to look like this:
[XDEBUG]
xdebug.max_nesting_level=200
xdebug.remote_connect_back=1
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.idekey=netbeans-xdebug
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.collect_params=4
xdebug.remote_host=HOST_IP #changed this, removed remote_autostart
So now you just have to turn debugging on in Netbeans and run export XDEBUG_CONFIG="idekey=netbeans-xdebug" in your VM's console.
Next run the script you want to debug.
I am trying to get XDEBUG up and going but having trouble getting the cookie to show. Below is what is put in my php.ini file. I restarted apache. I did a phpinfo() call and I do see xdebug enabled and the settings set. But when I do a localhost/?XDEBUG_SESSION_START=1 I am expecting to see a Cookie set to 1 in my browser right ?
zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.profiler_output_dir="/tmp"
when I run php -m I do not see it but I do see it in phpinfo
couldnt figure the exact answer but I went and downloaded the php.ini.default file from repo and set the following in the php ini
zend_extension ="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable=On
xdebug.remote_host=localhost
xdebug.idekey=foo
xdebug.profiler_enable=On
and it worked. could of been because of remote host. who knows. it worked. this is the bare minimum configurations for mac and this is if your going by the follwing installations for xdebug on mac
http://kubyshkin.ru/posts/installing-php-xdebug-extension-on-mac-os-x-10-7-lion.html
I try using xdebug with NetBeans to debug PHP. I start debug, and NetBeans waits for ever for a connection with xdebug. I have NetBeans 6.8 (latest version) with the latest MAMP package installed on my mac.
My php.ini looks like this:
[xdebug]
;zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
Finally, I had to add the idekey value like this:
xdebug.idekey="netbeans-xdebug"
now it works :-)
If your php.ini really looks like what you posted, you have to un-comment the zend_extension line (i.e. remove the ';' at its begninning), so Xdebug is actually loaded.
Then, make sure Xdebug is loaded, calling phpinfo() from a PHP file (just to be sure).
After that : I suppose there should be some options to configure the debugger in netbeans ? If so, is netbeans listening on port 9000 ? (The one you configured in php.ini)
The following settings worked for me with NetBeans 7.2 on Mountain Lion after restarting Apache:
zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
Mac/MAMP users: If you have tried all of the above and it still doesn't work, reboot your Mac. Restarting the servers through MAMP is not enough.
I used the following with XAMPP 1.8.2 and NetBeans 7.4 with success.
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.idekey="netbeans-xdebug"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = on
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_mode=req
xdebug.remote_host = "localhost"
xdebug.trace_output_dir = "C:\xampp\tmp"
for me worked this way (thank you guys +1) /o/
<pre>
zend_extension = "c:\xampp\php\ext\php_xdebug2.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler"dbgp"
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
</pre>
Config:
netbeans 7.3 - php 5.4 - xdebug 2.2 - xampp - win7(32bits)
I've read that xdebug doesn't work with the version of PHP what ships with OS X. I got it to work by updating php from version 5.4 to 5.5, using a handy package from php-osx.liip.ch, including precompiled xdebug extension. Use this command:
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5
Note that this will leave your default php installation intact, but disable it in httpd.conf. Your new php.ini will be at "/usr/local/php5/lib/php.ini", with the xdebug config file at "/usr/local/php5/php.d/50-extension-xdebug.ini".
Setup:
OS X version 10.9.2
Sources:
http://coolestguidesontheplanet.com/upgrade-to-php-5-4-or-5-5-mac-osx-10-8-mountain-lion/