开发者

Can't get XDebug to make a connection in Vim. Getting "no attribue 'stop'" error

Judging by how many search engine hits this error message generates, I know this is a common problem, yet there aren't any helpful answers out there.

I'm trying to setup XDebug in Vim using Sam Ghods Debugger.vim script while following the instructions on How to Debug PHP with Vim and XDebug on Linux (which is a commonly referenced source on getting Vim setup with XDebug). I'm running MacVim 7.3 on OSX 10.6 and when I try to connect the debugger to the server, I get:

(<type 'exceptions.AttributeError'>, AttributeError("DbgProtocol instance has no attribute 'stop'",), <traceback object at 0x104595680>)
  File "/Users/tjlahr/.vim/plugin/debugger.py", line 1078, in debugger_run
    debugger.run()
  File "/Users/tjlahr/.vim/plugin/debugger.py", line 928, in run
    self.protocol.accept()
  File "/Users/tjlahr/.vim/plugin/debugger.py", line 560, in accept
    self.stop()

Does 开发者_如何学Canybody have experience troubleshooting this error?

Please note that I'm not debugging over port 9000 because it seems it might conflict with fastcgi enabled in PHP. So I'm debugging over port 9001 and have changed by settings in php.ini and the g:debuggerPort variable respectively.

Thanks for your help.


I think I got it! Can you try installing this Vim Plugin: http://www.vim.org/scripts/script.php?script_id=2508


It seems that "AttributeError("DbgProtocol instance has no attribute 'stop'",)" is a general error.

I just installed XDebug and the debugger.vim plugin and ended up receiving this message. My problem was that remote debugging was not enabled. Build a phpinfo file:

<?php
    phpinfo();
?>

somewhere in your web server directory, and check over all your xdebug configuration variables, which should be listed near the bottom of the page. On my system with xdebug-v2.2.0-dev built from the GitHub repo, xdebug.remote_enable was set to false. Pasting that at the bottom of your php.ini file and setting it's value to 1 enabled clients to connect to the xdebug session.

Also, in the xdebug source there is a directory called "debugclient", which can be used to test any connection problems. Follow the instructions in the INSTALL file in it's directory to build it.

And, one last thought, after you run the plugin script in VIM, you need to refresh the webpage you are trying to debug within 5 seconds, or else the script, acting as a client, will timeout.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜