Skip to main content

Debug you PHP code using DRUSH

Submitted by sunildhimal on
Drush is a very handy tool which makes development in Drupal very fast and easy. Almost everyting is JACA("just a command away"). This particualr tip will help you to evaluate your php code using Drush. Examples: Consider a function: ji_custom($node). To evaluate/debug this function I type following in Drush: drush php-eval "ji_custom($node);"
Aliases for php-eval are: eval, ev N.B: JACA is invented while writing this post :)

Technologies