3

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?

3
  • Edited, changed IP address to my localhost IP address. In addition I tried to debug on my VM via vim, and nothing. I don't know whats wrong anymore. Commented Sep 13, 2011 at 21:20
  • can you ssh from your host into your vm? Can you open a webpage using ip.of.vm? What happens is that the xdebug will connect back to your ide at the ip address and port# (9000) you have specified. If it cannot make a connection to port 9k for some reason, it will not work. Commented Sep 13, 2011 at 22:00
  • Full guide here: How to debug code on a remote server (or in vagrant box) with PHPStorm Commented Oct 22, 2013 at 15:17

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Fixed that and still no luck :(
found the issue, this was part of it, the other issue was my httpd conf still have the incorrect port value in it.
With vagrant, I've had luck leaving remote_host empty and just using remote_connect_back=1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.