如何 debug/investigate Windows 的 YouCompleteMe 问题
How to debug/investigate issues with YouCompleteMe for Windows
更新
此问题寻求工具方面的帮助 - "how do I debug my problem." 在我键入此内容时,没有任何答案。对于我试图解决的实际问题,我确实最终绊倒了解决方案,并提供了解决方案作为答案。
尽管如此,我仍然非常乐意听到有关工具问题的任何答案,如果有人提出可行的答案,我将非常乐意转移复选标记
原题
我最初用 YouCompleteMe 打开了一个问题 https://github.com/Valloric/YouCompleteMe at https://github.com/Valloric/YouCompleteMe/issues/1345。它立即关闭,因为 Windows 没有官方支持。好的,好的。
我现在正在询问 Whosebug 社区,希望有人在为 Windows 搞乱 YCM(有一个 "unofficial YCM for Windows" 页面,所以一定有人在攻击这个东西) .
以下是我开的issue的原文
如果有人真的有一个有效的答案,那就太好了!在这一点上,我正在寻找更多可用于 运行 调试器下的 YCM 服务器的程序,以查看它到底在哪里阻塞
I'm trying to get YCM to work on my Windows 7 machine. I have a few
other XP, Win7, Win8 machines that have no problems with YCM. I've
tried building the support stuff using MinGW, Visual Studio 2010, both
on the target machine as well as the other machines where I have YCM
working.
When I open a Python or C++ file, a message immediately appears that
YCM has crashed and I should restart with :YcmRestartServer. It
mentions that I should set g:ycm_server_keep_logfiles in order to see
the log messages. I have done that, but I still don't have any
logfiles and the "set g:ycm_server_keep_logfiles" message is still
appearing.
I also get ('Connection aborted.', error(10061, 'No connection could
be made because the target machine actively refused it'))
I looked in python\ycm\youcompleteme.py and saw that the "logfiles
deleted" message comes up because of an exception in trying to open
the file specified by self._server_stderr (IOError). Right now I'm
suspecting that this is because the server never actually gets far
enough in its startup sequence to actually create the stdout and
stderr files.
What are the steps that I could do to investigate why the server (?)
fails to start properly.
I also had a vague idea that there was a firewall rule blocking
connections, I looked through Windows Firewall, but didn't really see
anything that would point to localhost connections being blocked or
whatnot.
I'm okay with doing debugging, would appreciate advice on the
procedure that I would need to do in order to get Visual Studio 2010
to step into the server process and poke around stuff.
Oh, dunno if this factoid means anything, but I'm able to use
Rip-Rip's clang_complete without issues, but I would very much rather
use YCM.
我从来没有真正得到 "how do I debug YCM under Windows" 核心问题的答案或解决方案,但我确实解决了为什么 YCM 对我不起作用的根本问题,所以对后代(以及其他绝望的 YCM可能通过 Google)
到达此处的用户
对我来说,YCM 一下子就崩溃烧毁了。通过看到一个对我来说运行良好的 Windows 系统开始出现症状,我解决了这个问题。
变化:我安装了 Python 3.x 并将其切换为系统首选 python(通过弄乱路径,你对 Windows 有什么期望?).
事实证明(duh),YCM 依赖于 Python 2.x,当它找不到它试图打开的任何库时就会崩溃。
我开始尝试准确定位 YCM 试图访问的文件并在 YCM 目录中本地提供它们,但在花了五分钟之后,我决定我想要更简单的东西。
因为我仍然希望 Python 3.x 成为 'system' 版本,所以我决定操纵路径 WITHIN Vim, 所以我在 YCM 加载之前添加了这个,
if (has('win32') || has('win64'))
let $PATH = 'C:\Python27;' . $PATH
endif
希望这可以减轻其他人的痛苦
更新
此问题寻求工具方面的帮助 - "how do I debug my problem." 在我键入此内容时,没有任何答案。对于我试图解决的实际问题,我确实最终绊倒了解决方案,并提供了解决方案作为答案。
尽管如此,我仍然非常乐意听到有关工具问题的任何答案,如果有人提出可行的答案,我将非常乐意转移复选标记
原题
我最初用 YouCompleteMe 打开了一个问题 https://github.com/Valloric/YouCompleteMe at https://github.com/Valloric/YouCompleteMe/issues/1345。它立即关闭,因为 Windows 没有官方支持。好的,好的。
我现在正在询问 Whosebug 社区,希望有人在为 Windows 搞乱 YCM(有一个 "unofficial YCM for Windows" 页面,所以一定有人在攻击这个东西) .
以下是我开的issue的原文
如果有人真的有一个有效的答案,那就太好了!在这一点上,我正在寻找更多可用于 运行 调试器下的 YCM 服务器的程序,以查看它到底在哪里阻塞
I'm trying to get YCM to work on my Windows 7 machine. I have a few other XP, Win7, Win8 machines that have no problems with YCM. I've tried building the support stuff using MinGW, Visual Studio 2010, both on the target machine as well as the other machines where I have YCM working.
When I open a Python or C++ file, a message immediately appears that YCM has crashed and I should restart with :YcmRestartServer. It mentions that I should set g:ycm_server_keep_logfiles in order to see the log messages. I have done that, but I still don't have any logfiles and the "set g:ycm_server_keep_logfiles" message is still appearing.
I also get ('Connection aborted.', error(10061, 'No connection could be made because the target machine actively refused it'))
I looked in python\ycm\youcompleteme.py and saw that the "logfiles deleted" message comes up because of an exception in trying to open the file specified by self._server_stderr (IOError). Right now I'm suspecting that this is because the server never actually gets far enough in its startup sequence to actually create the stdout and stderr files.
What are the steps that I could do to investigate why the server (?) fails to start properly.
I also had a vague idea that there was a firewall rule blocking connections, I looked through Windows Firewall, but didn't really see anything that would point to localhost connections being blocked or whatnot.
I'm okay with doing debugging, would appreciate advice on the procedure that I would need to do in order to get Visual Studio 2010 to step into the server process and poke around stuff.
Oh, dunno if this factoid means anything, but I'm able to use Rip-Rip's clang_complete without issues, but I would very much rather use YCM.
我从来没有真正得到 "how do I debug YCM under Windows" 核心问题的答案或解决方案,但我确实解决了为什么 YCM 对我不起作用的根本问题,所以对后代(以及其他绝望的 YCM可能通过 Google)
到达此处的用户对我来说,YCM 一下子就崩溃烧毁了。通过看到一个对我来说运行良好的 Windows 系统开始出现症状,我解决了这个问题。
变化:我安装了 Python 3.x 并将其切换为系统首选 python(通过弄乱路径,你对 Windows 有什么期望?).
事实证明(duh),YCM 依赖于 Python 2.x,当它找不到它试图打开的任何库时就会崩溃。
我开始尝试准确定位 YCM 试图访问的文件并在 YCM 目录中本地提供它们,但在花了五分钟之后,我决定我想要更简单的东西。
因为我仍然希望 Python 3.x 成为 'system' 版本,所以我决定操纵路径 WITHIN Vim, 所以我在 YCM 加载之前添加了这个,
if (has('win32') || has('win64'))
let $PATH = 'C:\Python27;' . $PATH
endif
希望这可以减轻其他人的痛苦