MacVim vdebug Python错误
我正在尝试在 MacVim 中使用 vdebug 和 xdebug 来调试代码。我已经通过 homebrew 安装了 MacVim 和 Python,并且 xdebug 也已经安装好,并且在 MacGDBp 中运行正常。
当我在 vdebug 中按 F5 键开始监听,然后重新加载一个页面(xdebug 的远程自动启动功能是开启的),我在 vdebug 的快速修复窗口中看到一个 Python 错误:
An error occured: <type 'exceptions.ImportError'>
Traceback (most recent call last):
File "/Users/mikedfunk/dotfiles/.vim/bundle/vdebug/plugin/python/start_vdebug.py", line 31, in run
self.runner.run()
File "/Users/mikedfunk/dotfiles/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 160, in run
self.open()
File "/Users/mikedfunk/dotfiles/.vim/bundle/vdebug/plugin/python/vdebug/runner.py", line 74, in open
raise e
ImportError: No module named expat; use SimpleXMLTreeBuilder instead
我在网上搜索了很久,但找不到有效的解决方案。有没有什么想法?
1 个回答
1
这个方法对我有效!发这个是为了帮助其他遇到同样问题的人:
https://stackoverflow.com/a/12697440/557215
这个方法是先把Homebrew安装的Python临时链接到Mac系统自带的Python上,然后再重新安装MacVim。现在xdebug可以正常工作了!