Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting PHPStorm working with XDebug

I am trying to get PHPStorm to talk to Xdebug, and am having very little luck.

Here is my setup: I have a VM which shares my php files from my local machine

I am trying to follow this: http://blog.jetbrains.com/webide/2011/02/zero-configuration-debugging-with-xdebug-and-phpstorm-2-0/

I put the following in my php.ini

zend_extension = /usr/lib64/php/modules/xdebug.so
xdebug.remote_connect_back = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_port = 9000
xdebug.remote_host = <my ip address>
xdebug.remote_log = /tmp/xdebug_remote.log

It appears I successfully got xdebug running according to phpinfo().

I open my script, turn on the listener. But when I get to the "Activate debugger on server" portion of the tutorial, things fall apart. I download the firefox addon to start the debugger(this one: https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/), click the icon to start the debugger, reload the page, but phpstorm does not find it. I also tried adding XDEBUG_SESSION_START=1 as a POST value yet still no luck.

What am I doing wrong?

like image 369
Logick Avatar asked Feb 21 '26 12:02

Logick


1 Answers

You want your remote_host to be the ip address that the vm sees on your localhost. It's not the IP address you get from your ISP.

like image 121
gview Avatar answered Feb 23 '26 00:02

gview



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!