I'm attempting to set up a project for debugging Drupal code in the Eclipse IDE as described in Configuring Eclipse for Remote Debugging with Zend. I have encountered a problem: the current version of Eclipse (in Windows) does not set up as described, and my best guess at what to do did not work.

Files/New/PHP Project does not appear to be relevant to the process. "Import" created a new project and let me import the files without physically copying them. Eclipse applied a name of its own to the project -- a meaningful name, but one apparently derived from some source other than the name of the root directory.

The dialog box for setting up the project for debugging is now separate from the Run/Debug command. To open it, select Run/Open Debug Dialog. The dialog box is generally as described. I entered the following values for the new PHP Web Page configuration. Tabs that I do not mention have all default values.

  • Server Debugger: Zend Debugger (the default).
  • PHP Server: I created a new one with the URL http://localhost/.
  • File: the Browse button displays a file tree which shows the contents of the Drupal root directory, but instead of that directory's actual name it shows the name of the Eclipse project, preceded by a single slash.
  • URL: this "field" has two parts. The first shows the path name of the document root (http://localhost/), and cannot be changed. Since the first part ends with a slash, I would expect the second part to consist of the Drupal root directory name alone, but when I entered that name, Eclipse prefixed it with two or three slashes. (As I wrote this I saw three slashes there, which I did not insert. I deleted them, saved and closed the box, and reopened the box, and found two slashes there.)

    After setting up the debug environment I selected Run/Debug. I got an error box that said "The selection cannot be launched, and there are no recent launches." And that's all she wrote.

Comments

wisdom’s picture

Eclipse IDE with php extension provides a general purpose php development environment. It is not specific to Drupal. Therefore, you can not use it to debug Drupal. However you can use it to edit, make syntax checks, etc of Drupal modules. In the real sense of the word Eclipse IDE with php extension is just an advanced editor for Drupal not a full fledged IDE.

Online Business

orthoducks’s picture

Please see the reference I cited in my message -- it gives detailed instructions for debugging Drupal with Eclipse. Some people have reported success. Others have reported problems. I am having a problem.

Let's see whether someone who has done it successfully can help.

1kenthomas’s picture

Eclipse IDE with php extension provides a general purpose php development environment. It is not specific to Drupal. Therefore, you can not use it to debug Drupal.

WRONG. Thanks for playing. Please come back when you are able to ask yourself "do I know anything about what I'm about to say" before you hit "submit."

wisdom’s picture

Almost a year ago I was hunting for such tool. But I ended up coming to the conclusion I stated earlier. Since then I was also putting my eye for similar feature but did not see any. The only one I found was one commercial IDE with expensive price tag. Well if Eclipse has such feature yes certainly what is that I eagerly would like to see too.

Probably things are changed much faster than I expected. Anyway this is a forum for discussion and expressing what one thinks and to learn from others. Glad to know there is such feature. I will try it soon.

Online Business

1kenthomas’s picture

Glancing over, I see two problems:

1) You don't seem to have imported the drupal root as a PHP project.

2) You don't seem to have set up a debug project with that drupal root as the server/filesystem, and the correct http.

Also, I'm not sure localhost will work-- should, but I've never tried.

Sorry I don't get to come around forums often, but it looks like you've just got config problems.

orthoducks’s picture

I'm pursuing this with Zend, which offers support for debugger configuration in conjunction with Zend Studio (not with Eclipse). They say the debugger isn't running. I don't know why yet, but I'm following that line of inquiry. I'll report the results when I have some.

Debugging on localhost is supported, and is reputed to be easier to set up than remote debugging.

1kenthomas’s picture

Well, you should be able to see if you've set up the debugger correctly via phpinfo().

It's simply easier to get things set up locally first, after that, it's just a matter of ports/protocols to get remote debugging (though I'd suggest restricting on an IP-by-IP basis).

Again, good luck.

orthoducks’s picture

Well, you should be able to see if you've set up the debugger correctly via phpinfo().

If you could tell me what to look for, that would be useful.

Relying on one of several pieces of documentation I found, I looked at a phpInfo listing and concluded that the debugger was loaded. But when I asked Zend for assistance I uploaded the listing to them, and they told me that it showed the debugger was not loaded. So far I have not gotten an explanation of what I should have looked for.

1kenthomas’s picture

The first section of your info should return a line such as:

Zend Extension 220xxxxxxx

as well as

Zend Memory Manager enabled

just below this section you should have...:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.x.x, Copyright (c) 1998-2007 Zend Technologies
with Zend Debugger v5.x.x, Copyright (c) 1999-2007, by Zend Technologies

etc.

francewhoa’s picture

Same here. I wrote a how-to handbook for Windows XP at http://drupal.org/node/765120

Loving back your Drupal community result in multiple benefits for you