LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-12-2010, 08:56 PM   #1
qhhatman
LQ Newbie
 
Registered: Oct 2008
Posts: 19

Rep: Reputation: 0
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!
 
Old 02-24-2010, 02:59 AM   #2
qhhatman
LQ Newbie
 
Registered: Oct 2008
Posts: 19

Original Poster
Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache + PHP xdebug + fcgid = read data timeout in 40 seconds Miggleness Linux - Software 1 12-18-2009 09:43 AM
Debugging PHP? waelaltaqi Linux - Newbie 14 12-05-2008 12:05 AM
LXer: Debugging PHP using Eclipse and PDT LXer Syndicated Linux News 0 06-18-2008 09:36 AM
LXer: How to Debug PHP with Vim and XDebug on Linux LXer Syndicated Linux News 0 03-04-2008 04:40 AM
LXer: Debugging PHP with Firebug LXer Syndicated Linux News 0 02-19-2007 11:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration