Eclipse PDT xdebug 有时很慢并且路径映射
我有时会遇到使用 Eclipse 进行缓慢(远程)调试的情况,并且无法了解到底是什么原因。我也有路径映射的问题,我认为这可能是相关的。
我调试了各种项目,所有项目都在同一台计算机托管的本地域名上。例如
- project1.localproject2.example.com
- 我还有一个当前的project1 ,
这些域名是在/etc/hosts中定义的
它实际上通过curl调用来调用project2。
我通过附加 ?XDEBUG_SESSION_START=1 来通过 Chrome 或 Firefox 浏览器启动所有调试会话,并且curl 调用使用相同的方法。
有时/定期,我发现在调试会话开始之前大约 2 分钟内没有任何反应。在那之前,浏览器似乎只是在等待什么。到达断点后,我可以以正常速度逐步调试。对于下一个请求,我有相同的等待时间。
以下是我在尝试过的事情方面的经验:
- 关闭并重新启动 eclipse:很少有助于
- 尝试在 Komodo 中调试相同的 url:总是有效(不要误会我的意思,我更喜欢 Eclipse) -->显示它不是 xdebug 问题
- 重新启动 Web 服务器:很少有帮助
- 等待 30-60 分钟:几乎总是有助于
- 清除调试域的所有 cookie:在可能 30% 的情况下有帮助,与切换浏览器相同
我遇到的路径映射问题有时是这样的当到达断点时,即使文件已经打开,也会打开不同的文件编辑视图。一个文件具有工作区特定路径,另一个文件具有绝对路径。
任何人都可以帮助我解决以下任一问题:
- 解决路径混乱(希望这是根本原因)
- 使用其他工具来弄清楚在 2 分钟内会发生什么
- 建议其他行动路径?
I experience slow (remote) debugging with Eclipse sometimes and can't get to the bottom of what the reason may be. I also have an issue with path mapping, which I think may be related.
I debug a variety of projects, all on same-machine-hosted local domain names. For example
- project1.local
- project2.example.com
These domain names are defined in /etc/hosts
I also have a current project1 that actually calls project2 through a curl call.
I initiate all debugging sessions through chrome or firefox browser by appending ?XDEBUG_SESSION_START=1 and the curl call uses the same method.
Sometimes/ Regularly, I experience that nothing happens for about 2 minutes until the debugging session starts. Until then, the browser just seems to wait for something. After a breakpoint is reached, I can debug step by step with normal speed. On the next request I have the same wait time.
Here is my experience in regards to things that I have tried:
- shutting down and restarting eclipse: rarely helps
- trying the same url to debug in Komodo: always works (don't get me wrong I like Eclipse better) --> shows its not an xdebug problem
- restarting web server: rarely helps
- waiting 30-60 minutes: nearly always helps
- clearing all cookies of debugged domain: helps in maybe 30% of cases, same with switching browser
The path mapping problem I have is in that sometimes a different file edit view is opened when a breakpoint is reached, even if the file is already open. One file has a workspace specific path, the other one an absolute path.
Can anybody help me with either of:
- resolving the path confusion (hoping this is the root cause)
- using other tools to figure out what happens during the 2 minutes
- recommending other paths of action?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
http://garywaddell.com/?p=303 我发现这可以帮助
这里是链接说
http://garywaddell.com/?p=303 i found this to help
here is what the link says
好吧,解决方案似乎是:
Ok, the solution appears to be: