bstamour
bstamour

Reputation: 7776

Debugging multi-file PHP script with Emacs and GEBEN

I have XDebug working fine on my local machine (I have apache running locally) and I am able to debug php scripts fine with eclipse. I prefer to edit files with emacs, however, and so I came across the GEBEN package. I installed it fine, and I am able to set breakpoints in my script and everything seems to work fine...

I am now trying to debug a cakePHP app, and I need to set breakpoints in files that are different than the file loaded into emacs when geben starts. Here's what's going on:

  1. I start my web server, php, and all that.
  2. I start emacs, and run the command M-x geben. It tells me that it is now listening on port 9000
  3. I browse to the page I want to step through (http://url?XDEBUG_SESSION_START)
  4. The initial PHP file is loaded into emacs, and I can set breakpoints, step over, etc.

How can I set breakpoints in files that are included from that initial PHP file? I have tried opening the files, and starting the geben minor mode, but when I run the command geben-set-breakpoint-line nothing seems to happen.

Am I missing something?

Upvotes: 4

Views: 1637

Answers (1)

phils
phils

Reputation: 73294

You need to use GEBEN's own command for opening files: geben-find-file.

You should find C-cf bound by default in existing geben buffers (which of course is a bug, as that's a reserved binding, but it should work).

The resulting buffer will be associated with the debug session, and you should be able to set breakpoints and do all the same things you could do from the index file.

You should use C-hm to peruse the mode help and bindings.

Upvotes: 4

Related Questions