Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs+geben: Open local files when debugging instead of remote ones

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?

like image 296
cweiske Avatar asked Apr 24 '11 22:04

cweiske


1 Answers

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.

like image 136
Tom Macdonald Avatar answered Oct 18 '22 11:10

Tom Macdonald