LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   vim not connecting with xdebug for php debugging (https://www.linuxquestions.org/questions/linux-software-2/vim-not-connecting-with-xdebug-for-php-debugging-781835/)

qhhatman 01-12-2010 08:56 PM

vim not connecting with xdebug for php debugging
 
I'm running Ubuntu server 9.10 karmic koala and my client is also ubuntu 9.10 karmic. I've installed xdebug on the server and added to the php.ini file:
zend_extension = /full/path/to/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_host = localhost
xdebug.remote_handler = dbgp

Vim and the proper plugins (debugger.vim and debugger.py) are both installed. I load the php file under consideration in my browser on the client with ?XDEBUG_SESSION_START=1 as part of the URL. I then vim the php file, press F5 and reload the page in firefox. Vim shows that it is waiting for 5 seconds for the connection. After 5 seconds it shows an error message that says:
<type 'exceptions.AttributeError'>, AttributeError("DbgProtocol instance has no
File "/usr/share/vim/vim72/plugin/debugger.py", line 1078, in debugger_run
debugger.run()
File "/usr/share/vim/vim72/plugin/debugger.py", line 928, in run
self.protocol.accept()
File "/usr/share/vim/vim72/plugin/debugger.py", line 560, in accept
self.stop()

After some googling it has become apparent that these messages mean nothing and the problem is that the connection is just never happening. Xdebug is supposed to be working on port 9000. I've looked at /etc/services and nothing else is mapped to port 9000. I've tried ssh -p 9000 xxx@a.b.c.d and had the connection refused (ssh without a port spec works fine). Now I don't know what to do to get this thing working and I really want it working. HELP!

qhhatman 02-24-2010 02:59 AM

After having been away for a bit I've come back to this problem and have found that previously I was brain dead. The problem was the setting xdebug.remote_host = localhost. I'm not working on the localhost (my server). So I just had to change the value localhost to my ip address, 192.168.1.100 in my case. I'm posting this in case it helps someone else in the future. Cheers.


All times are GMT -5. The time now is 08:44 PM.