IDE and Debugger
Help. I pretty much wasted the weekend away trying to get an IDE (any IDE) and debugger (any debugger that works) setup for my local Drupal dev environment.
Tried Eclipse (even bought a PackT ebook on the subject) in many forms... PDT, PHPEclipse, others. Tried a couple debug options like Zend, xdebug. The IDEs work to some extent but I really need debugging and have failed on every attempt in that regard. Even tried CodeLobster (very briefly) and NetBeans. Can't get debugging to work in any of these systems. But I think I'm close on several counts.
My dev environment...
Ubuntu 9.04
Apache2
Document root is /var/www/_drupal
Drupal 6.14
Multi-site with contrib and custom modules in /var/www/_drupal/sites/all/modules
Site settings in /var/www/_drupal/sites folders named igo.localhost, wieting.localhost, etc.
Hosts configured so that http://igo.localhost and http://wieting.localhost open these
So I'd like to have a look into debugging (for now) my /var/www/_drupal/sites/all/modules/igo/igo.module code.
I feel like my configuration with Eclipse PDT and xdebug is closest to working, but I'm not entirely sure how to configure an Eclipse PDT project properly and end up (after many, many tries) with no execution of anything resembling a debugger (or even a browser window) and no warnings or errors with clues to what went wrong.
Anybody care to suggest a good IDE and debugger with relevant instructions to configure it for a setup like mine?
Thanks.


Ical feed
Been there...
Hi, debugging in PHP is not easy to set up usually. For free software the best tool for an "out of box experience" is Netbeans. Debugging works great. I can't remember if it uses it's own embedded web server or if it uses the one on your PC but there's a nice easy tutorial on their website. You'll be working in 15 min. Download the version from the netbeans website, don't use apt-get to install it.
My friend who invested in the Zend studio loves it and feels it's a great experience. I've not tried it but I trust his recommendation. I think there's a trial version.
In either case, start simple.
Oh, btw, I think there is a module for develping drupal stuff in netbeans. Check out: http://drupal.org/node/327486 but there may be better URLs.
--
Matthew Nuzum
newz2000 on freenode
Thanks Matt
Headed down the NetBeans path last night (from the same link you posted above) and came close, I think, to making it work. I actually got a debug session started and it opened a browser suggesting that it was tied to the debug session (farther than I got with Eclipse) but the whole process just sat spinning for about 30 minutes before I killed it.
Been reading more this morning and I'm really suspicious that my Apache configuration isn't right for debugging. Everything I read suggests that server setup for debugging can be tricky. My setup (apart from debugging) "works" for my multi-site setup but I've never been convinced it works "right".
I may just give NB another look this morning now that I've had a little sleep.
Thanks.
Mark
Spinning is good
When the browser just sits and spins it usually means your debugger is waiting for you to step through the program. That's a sign that everything is working. :-)
--
Matthew Nuzum
newz2000 on freenode
That's What I Thought Too
Yean, that's what I thought too, but I couldn't find any way to get it off the breakpoint (if that is in fact what was happening). I just don't think I have my project configured properly at all. Any chance you could write back with a phone number so that IU might call and see if you can get me over this hump?
Another possibility... I've got my dev machine and am considering wiping it clean and installing Ubuntu 9.10 (in place of 9.04). I'm concerned that I have tried and failed with so many IDEs and debuggers now that something might be cross-wired, so to speak. Also, the fresh start would give me a chance to set my LAMP and NetBeans projects up properly... if only I knew what that was for sure! 8^(
mark@tamatoledo.net
Mark
Got It!
OK, I got NetBeans working! I think the issue I had was with project configuration. I pointed my "sources" to the full Drupal code set rather than just the individual, custom module that I need to debug. Now that I have narrowed the project focus (considerably!) NetBeans is behaving more as I'd expect it should.
So, next question...
On my dev system the NetBeans UI looks a little flaky. Specifically, all the text which appears on a lite gray background (like the main menu and a couple of the toolbars) has a green tint to it. Is there an easy way to change the font or skin of the UI? It's not a show-stopper but if I look at that text long enough I fear I'll turn green myself.
Thanks again Matt for encouraging me to give this another shot. Take care.
Mark
two possible fixes
Hi, glad to hear you got past the first hurdle. There are two issues I know that would cause your problem. Here are two things to check:
Least likely:
http://www.bearfruit.org/blog/2008/02/07/parallels-on-ubuntu-has-transpa...
(in the 'env' command don't end with parallels instead end with netbeans or whatever command starts netbeans)
More likely is your theme has some exceptions or rules that are causing netbeans text to not look right. The simple way to test is to switch your theme in settings -> appearance to something else. If this fixes it then the right solution is to create, or get help creating, a .gtkrc rule that fixes the problem. I don't know how to do this, it's a theme developer problem, but you can file a bug about it and then possibly ask the ubuntu art team if they can help fix it.
If neither of these help you may want to consider logging into IRC to the freenode IRC server and asking for help in the #netbeans chat room.
--
Matthew Nuzum
newz2000 on freenode