Author Topic: Listen for Xdebug connections outside 127.0.0.1  (Read 4367 times)

beandog

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Listen for Xdebug connections outside 127.0.0.1
« on: March 04, 2010, 12:42:00 AM »
I develop my PHP application using Windows, but the code I'm writing actually resides on a Linux VM that's set up similarly to our production environment.  I've used another PHP IDE (my own, actually) with XDebug successfully in the past, so I know it's set up correctly.  SE just doesn't see any connection attempts from my VM.

I see that it says "Listening for Xdebug connection on 127.0.0.1:9000".  The connection is actually coming from 192.168.1.7 over port 9000.  Is there any way to change what IP address it listens to for debugger connections?

Here's the relevant portion of my php.ini:

[XDebug]
zend_extension="/usr/lib/php/modules/xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 192.168.1.6
xdebug.remote_port = 9000
xdebug.remote_mode = req
xdebug.idekey=slickedit

Xdebug is version 2.0.5.



Ben Dilts

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 798
  • Hero Points: 54
Re: Listen for Xdebug connections outside 127.0.0.1
« Reply #1 on: March 04, 2010, 01:19:36 AM »
You can change the address to listen on from: Build>PHP Options, Debug tab.

However, I would direct you to the help topic: "Running and Debugging PHP" (you can hit F1 in same dialog). Scroll down to directions on "Using an SSH Tunnel to Debug a Remote Web Page". This is the method I will always recommend if you have a choice.

--rodney