Reputation: 2864
I have spent hours getting XDebug to work with Intellij, but with no luck unfortunately.
My setup is as follows. I am on a Windows 7 machine, I have Intellij 12 installed. My PHP site runs on a Vmware virtual Linux (debian) box.
I have configured the following Xdebug settings in php.ini.
; xdebug settings
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.profiler_enable=1
;xdebug.profiler_output_dir="/usr/lib/php5/xdebug-output"
xdebug.remote_host=192.168.1.71
xdebug.show_exception_trace=On
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=1
All that really happens when I enable the xdebug settings in PHP.ini is that my site becomes slow.
You might wonder why I put Intellij in the title. I was trying to connect to xdebug from Intellij. but I have left intellij, because I think something is wrong with my basic xdebug setup.
Your help will be much appreciated.
Upvotes: 1
Views: 1756
Reputation: 11
correct settings for xdebug on intelliJ IDEA on windows wamp is look for php.ini file find xdebug at bottom,
[xdebug]
xdebug.remote_enable = On
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_autostart=0
Upvotes: 1
Reputation: 36774
The IP that you use, should be the IP of the machine running the IDE - not the one with PHP/Xdebug on it. Xdebug acts as the client, and the IDE as the server, and in order for Xdebug to connect to the IDE/server, it needs to know the IP address of that.
Alternatively, you can set xdebug.remote_conneck_back=1 to let Xdebug use the IP of the machine that makes the browser request (often the same as the machine/IP with the IDE on it).
Upvotes: 0