Emacs+geben:调试时打开本地文件而不是远程文件

发布于 2024-11-03 10:12:14 字数 537 浏览 6 评论 0原文

先决条件

  • 使用 PHP 和 xdebug 的 Web 服务器。通过 NFS 共享的 htdocs 目录。
  • 运行 emacs 和 geben 的开发者机器。通过服务器 htdocs 目录的 NFS 挂载编辑的文件。

问题

使用 emacs 和 geben 调试 PHP Web 应用程序时,打开的 Web 应用程序的文件不本地文件,但代表服务器上文件内容的“虚拟”文件。

我遇到的主要问题是我无法直接编辑这些文件,因为我会在服务器上更改它们,这会导致以下几个问题:

  • 更改临时文件会导致 emacs 要求我提供 ssh 登录凭据
  • 更改临时文件, emacs 想要重新加载原始打开的文件,因为它们更改了
  • 临时文件上不可用的跳转标记

理想情况下,需要设置远程路径到本地路径的映射,但我认为目前 geben 不可能做到这一点。 这个问题有解决办法吗?

Prerequisites

  • Web server with PHP and xdebug. htdocs directory shared via NFS.
  • Developer machine running emacs with geben. Files edited via NFS mount of server htdocs directory.

The problem

When debugging PHP web applications with emacs and geben, the web app's files that are opened are not the local files but "dummy" files that represent the file contents on the server.

The main problem I have with that is that I can't directly edit the files because I'd change them on the server, which causes several things:

  • changing a temporary file causes emacs to ask me for ssh login credentials
  • changing a temporary file, emacs wants to reload the original open files because they changed
  • jump marks are not available on the temporary files

Ideally, a mapping of remote paths to local paths would need to be setup, but I think that's currently not possible with geben.
Are there solutions to this problem?

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

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

发布评论

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

评论(1

盗梦空间 2024-11-10 10:12:14

我不确定您使用的是什么操作系统,但使用 sshfs 可能会更成功,因为它看来这就是您用来连接到远程服务器的方法。

尝试使用私钥设置 ssh。这样您就不会经常被要求输入密码。

I am not sure what OS you are using, but you may have more success using sshfs, as it seems that that is what you are using to connect to the remote server.

Try setting up your ssh with a private key. That way you will not get asked for the password so much.

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