This site is archived.

Debugging Drupal: Hands-on techniques

Got bugs? Get knowledge. (http://www.flickr.com/photos/deniscollette/2341238645/)
Code & Development

Presenter:

Track

Code & Development

Experience

Beginner | Intermediate | Expert

Focus

Developer | Themer

Debugging Drupal: Hands-on techniques

Day:  Tuesday, 24. august 2010
Time:  17:15-18:00
45 minutes (+15 minutes Q&A)

Room:

tags

(Here is the presentation)
[Update: Several people asked for a writeup on how to run a catchall Apache virtualhost]

There are bugs in every piece of software, and Drupal is no exception, and your site is no exception either. You just have to be prepared to deal with the bugs. Learn effective strategies to approach them, handy techniques to find them, and get your tools set up and mastered.

There will be tips and strategies for developers, themers, and site administrators in this session. This session may even help you to live a better life :-)

Strategies

  • Preparation before the crisis: Solve probems on a local copy, not on the live site!. Get everything under source control.
  • Don't forget the stupid stuff. Have you looked in the log yet?
  • Understand basic organizing ideas like "Divide and Conquer"
  • Organize your tools and upgrade your techniques beforehand.

Techniques

  • Quick code hacks that tell you the answer right away (to find out problematic database queries, hook invocations, cron failures)

Tools

  • Devel module
  • A step debugger like Eclipse

Eclipse setup for debugging, step by step

Everybody can make Eclipse work for step debugging. I'll show you how to set up Eclipse from scratch for step-debugging. You'll get the techniques that will work on Linux, Windows, or Macintosh environments.

Resources

For mac users who want a

25. August 2010 - 9:10

For mac users who want a graphical debugger but don't want to use an IDE a good alternative is MacGDBp (https://www.bluestatic.org/software/macgdbp/).

I use Xdebug configured to provide errors with clickable links to the trouble line in TextMate but for step debugging I use MacGDBp.