Errors are the oldest form of error handling in PHP dating all the way back to PHP 3. Trigger_error is still useful in certain very limited circumstances owing to the fact that, unlike exceptions, errors cannot be caught or if they don't stop the system then code continues on the line following trigger_error. Drupal primarily makes use of Exceptions and assertions, using errors only when necessary to cause an immediate halt of the system.


Exceptions are the preferred method of fault handling in Drupal. Their use is documented at PHP Exceptions. They should be used in all cases but two.

Faults: Assertions, Errors, and Exceptions

(API still in development)

Sooner or later problems occur in all computer programs. There are three problem groups in PHP

How to use Xdebug and PhpStorm with VDD

How to use Xdebug and PhpStorm with VDD

VDD supports out of the box Xdebug working configuration. You can simply start your virtual environment, open your project with PhpStorm and start debugging.


To make your debugging more comfortable you should install Xdebug helper extension in your browser. I'll use Google Chrome in this example.

Advanced debugging of Drupal core using the command line (strace & tcpdump)


Debugging of Drupal was never easy, until you know the right tools and how to use them.

There are plenty of alternative debugging methods using some popular PHP libraries XDebug, XHProf, NuSphere PhpED, etc. and also most of the IDE have already built-in step-by-step debugger.

Blank pages or "white screen of death" (WSOD)

Occasionally a site user or developer will navigate to a page and suddenly the page content disappears, and it becomes blank. No content. No errors. Nothing. This happens sometimes, It could happen after updating a module, theme, or Drupal core. This is what is referred to by most members of the Drupal community as the White Screen of Death or WSOD. There are several reasons why this might occur, and therefore several possible solutions to the issue.

(Note: The suggestions on this page might solve the problem even when you do not get the WSOD as it relates to an Internal Server Error.)

"Invisible" Errors

If error reporting is turned off, you could be getting a fatal error but not seeing it. On a production site, it is common to have error reporting turned off. If that is the case and PHP has hit an unrecoverable error, neither an error nor content will be displayed, therefore you end up with a completely blank page.

What you can do about this is either turn on PHP error reporting so it displays a message on the page itself, or check your log files (from the server) to look for the error. How to do both of these are explained below.

Enable Error Reporting

Subscribe with RSS Subscribe to RSS - debugging