xdebug vim 插件的问题

发布于 2024-07-14 14:17:07 字数 261 浏览 7 评论 0原文

我正在使用 vim 的 xdebug 插件。 进行一些更改后,我能够运行调试器,但无法设置断点。 所以,我启用了xdebug.remote_log,下面是设置断点对应的日志语句。

<-breakpoint_set -i 5 -t line -f file:///C:\htdocs\testLocal.php -n 36 ->

它仅以正确的格式向调试器发出请求,但不知道为什么调试器返回“命令不可用”。 如果有任何问题,请告诉我。

I am using xdebug plugin for vim. After making few changes i was able to run debugger but not able to set breakpoints.
So, I enabled xdebug.remote_log and below is the log statements corresponding to setting breakpoint.

<- breakpoint_set -i 5 -t line -f file:///C:\htdocs\testLocal.php -n 36
->

Its issuing request to debugger in proper format only but no idea why debugger is returning "command is not avilable".
Please let me know if anything is wrong.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

树深时见影 2024-07-21 14:17:07

确保在包含 php 表达式的行上设置断点,而不是在空白行或仅包含右括号的行上。

在空行上设置断点不起作用,并且会返回您收到的神秘“命令未找到”错误。

Make sure you set breakpoints on lines that contain a php expression, not on blank lines or lines containing just a closing bracket.

Setting breakpoints on blank lines doesn't work, and returns the cryptic 'command not found' error you are getting.

她比我温柔 2024-07-21 14:17:07

我有同样的问题。 当我检查 xdebug 日志时,它显示 file:///http://myapp.local
正如你所看到的,我的 ide (PHP eclipse) 似乎插入了额外的“http://”,将其视为 URL 而不是文件。

幸运的是,只有我的index.php 就是这种情况。 其他文件断点已正确传达到 xdebug,只要它们不知道跨越多行,我就能够在 php 表达式上设置并命中断点。 后者由于某种原因会导致断点没有命中而只是通过。

希望这可以帮助!

I had the same problem. When I checked the xdebug logs, it showed file:///http://myapp.local
As you see my ide (PHP eclipse) seems to insert the extra "http://" treating this as a URL instead of a file.

Luckily, this was the case with just my index.php. Other file breakpoints were being communicated correctly to xdebug and I was able to set and hit breakpoints on php expression as long as they didn't know span multiple lines. The latter for some reason would cause breakpoints to not hit and just pass by.

Hope this helps!

素染倾城色 2024-07-21 14:17:07

我在“file:///C:\htdocs\testLocal.php”中发现了一个额外的“/”,也许vim插件与windows文件路径不兼容?

I spotted an extra "/" in "file:///C:\htdocs\testLocal.php", mayby the vim plugin isn't compatible with windows filepaths?

緦唸λ蓇 2024-07-21 14:17:07

我最近刚刚安装了同样的东西,并找到了一个 教程Blake Johnson 有关在 Vim 中安装和使用 Xdebug 的所有内容。

另外,请尝试清除页面上可能拥有的所有 cookie。 这通常会导致插件以一种奇怪的方式搞砸。

I recently just installed this same thing and found a tutorial by Blake Johnson all about installing and using Xdebug from within Vim.

Also, try clearing any cookies on the page you might have. This often times would cause the plugin to get screwed up in a strange way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文