在本地驱动器或 vps 上设置 xdebug?

发布于 2024-12-14 03:28:51 字数 200 浏览 3 评论 0原文

我有兴趣尝试使用 xdebug 来调试我用 PHP 开发的一些应用程序,但是我不确定将其本地安装在我的 xampp 配置上还是安装在我的删除 VPS 服务器上是否有利。

这样做有什么好处吗?我的担忧之一是我的远程 VPS 的内存量有限,我担心任何不必要的开销/内存消耗,但是如果在我的远程 VPS 上安装它会给我带来一定的好处,我准备做出牺牲。

非常感谢

I'm interested in trying xdebug to debug some applications I'm developing in PHP, however I'm not sure whether it would be advantageous to either install it locally on my xampp configuration or on my remove VPS server.

Are there any benefits to doing either? One of my concerns is my remote VPS has a limited amount of memory and I'm worried about any unnecessary overhead/memory consumption, however I'm prepared to make the sacrifice if installing it on my remove VPS will bring me certain benefits.

Many thanks

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

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

发布评论

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

评论(3

所有深爱都是秘密 2024-12-21 03:28:51

尽管新版本确实允许您过滤将调试信息发送到的 IP 地址,但事实是 XDebug 连接回您的计算机以使用调试器(因此,增加了其他人从实时站点获取信息的能力) 。

我建议,如果您可以避免它,请不要将 XDebug 扩展安装到您的 VPS 中...此外,如果您在本地进行所有开发,那么使用调试器不是更有利的地方吗?

Although the newer version does allow you to filter which IP addresses to send debug information to, the fact is that XDebug connects back to your computer to work with the debugger (hence, increasing the ability for someone else to grab information from the live site).

I would suggest that if you can avoid it, don't install the XDebug extension into your VPS... Besides, if you're doing all of your development locally, isn't that the more beneficial place to have the debugger?

养猫人 2024-12-21 03:28:51

当然,如果您需要的话,您应该将其安装在您的开发计算机上。如果你不这样做,那就没有必要了。

我通常可以使用 var_dump() 解决问题,但有时使用 xdebug + NetBeans 更容易找到错误。 YMMV。

您永远不应该在生产计算机上使用 xdebug,除非您确实无法在其他地方复制该错误 - 即使这样您也应该使用日志记录来查找它。

You should install it on your development machine, if you need it of course. If you don't then there is no need for it.

I can usually get around with var_dump()s, but it is sometimes much easier to find a bug using xdebug + NetBeans. YMMV.

You should never use xdebug on a production machine, unless you really can't duplicate the bug elsewhere - and even then you should probably use logging to find it.

迷爱 2024-12-21 03:28:51

我有相同的设置。我在我的开发服务器上将 XDEBUG 与 XAMPP 一起使用,并在我的 VPS 上安装了 XDEBUG,以为我会直接在 VPS 上使用它。

但到目前为止我还没有在VPS上使用过它,本地安装就足够了。

我在实时安装中使用 XDEBUG 的唯一好处是能够测试实时数据。但是您可以通过使用本地计算机上的 VPS 的数据库转储来解决这个问题。

正如其他人所说,XAMPP 连接回来,虽然您可以通过 IP 过滤它,但它可能是一个安全问题。

我建议在本地和 VPS 上都安装它,看看你是否真的需要在 VPS 上使用它。

I have the same setup. I use XDEBUG with XAMPP on my dev server, and installed XDEBUG on my VPS thinking I'd use it directly on VPS.

But till date I haven't used it on VPS, and the local installation has sufficed.

The only benifit I can see using XDEBUG on the live instalation is the ability to test on live data. But you can get around it by using a database dump from VPS on your local Machine.

As others have said XAMPP connects back and though you can filter it by IP, it May be a security issue.

I would suggest install it on both local and VPS, and see if you actually need it on VPS.

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