I've run into a really nasty bug. It produces a plain WSOD without bothering to produce an error message like all my other bugs do. It doesn't give me a backtrace with devel and krumo. Nothing.
So, I figure that I need a stepping debugger to find out exactly where it is blowing up. The PHP debugger appears to be xdebug.
I found http://xdebug.org/docs/remote. However, that's where it gets confusing. I can't find a good explanation for how to set it up. There seem to be a lot of clients out there, but I have no idea which I should use.
My test system is my Fedora Linux desktop running Apache. That should be fairly straightforward, right?
Can anyone point me to a walkthrough or recommend a remote debugging client that plays well with D7? I don't want to spend hours setting this up the wrong way.
I do need a remote debugger for this, right?
Comments
A suggestion
Hello,
I recommend you set up a local installation (I.E. php, web server and database on you laptop). First, if the php interpreter fails, those errors are usually in the web server logs (or system logs). Most hosting services do not give you access to those logs.
Next, the same issue applies to the php environment. On a local installation you can customize the php environment as you please. That is seldom the case on a hosting service.
You need to be able to add the xdebug settings to you php.ini file. You also will need to inspect the output of phpinfo to verify xdebug is enabled.
I recommend using an IDE to edit and debug Drupal. An IDE adds gui controls for setting breakpoints, inspection of data structures, etc. There are many to choose from. I use Netbeans ( http://netbeans.org/) -- you have to choose the PHP version (or add the PHP plugin later).
I always develop with a debugger. It takes a little time to set up. However. over the long haul, the debugger will save you a mountain of time :)
Good Luck :)
Thinking is the best way to travel.
Sorry, yes, I'm doing this
Sorry, yes, I'm doing this all on my personal desktop.
I'll have a look at netbeans. Is there a walkthrough for setting it up for PHP?
Does anyone have other suggestions for graphical debuggers?
--
www.ztwistbooks.com. Math books that are actually fun.
_
may not be related, but I had just read it so it's fresh: http://wunderkraut.com/blog/fatal-error-maximum-function-nesting-level-o...
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Another suggestion
Hello,
Perhaps this is what you are looking for: http://wiki.netbeans.org/HowToConfigureXDebug.
Have you added any of the xdebug settings to your php.ini file? Have you run phpinfo to see if xdebug is enabled?
If you use netbeans, select the option/settings dialog for PHP/XDEBUG. The default setting is for small php application. The default is to automatically set a break point on the first line of the php program. For Drupal module development, you want to turn that off.
What does "graphical debugger" mean? You are trying to analyze graphics?? Xdebug is also profiler. It can generate reports, Is that what you mean. Graphical reports of an application's profile??
Oops. Almost forgot to answer the first part of your question :) Once you install Netbeans/PHP, there no additional steps required. For example, I have Drupal installed locally in a directory /home/goofus/development/drupal7.I simply start netbean, use the menu, <File><New Project><PHP Project with Existing Sources>. It opens a file local dialog, I choose /home/goofus/development/drupal7, Netbeans reads in all the Drupal source. You are ready to go :)
Good Luck :)
Thinking is the best way to travel.
What does "graphical
As opposed to a command-line debugger, like gdb was before someone made emacs run it. Most IDEs have one of these, I think.
Thanks for all the tips, all. I really appreciate them.
--
www.ztwistbooks.com. Math books that are actually fun.
That is what an IDE does
Hello,
The IDE's provide the "graphical" interface you are referring to :) You don't need to run any command line instructions :) You just "click debug" :)
FYI -- Netbeans can also set the same GUI wrapper around gdb. So can the other IDE's
Good Luck :)
Thinking is the best way to travel.
Thanks!
I got Netbeans working with xdebug, found the bug, and fixed it.
--
www.ztwistbooks.com. Math books that are actually fun.
Great work!!
Hello,
Great to hear you got everything working :)
Please consider editing the subject line of your original post and add "[SOLVED]", That way other folks kind find the solution.
Again, great work :)
Thinking is the best way to travel.
Done: I'll note that I have
Done.
I'll note that I had one problem getting it working. It wouldn't connect until I restarted Apache.
--
www.ztwistbooks.com. Math books that are actually fun.