Currently, when I inspect the form structure in CiviCRM using CRM_Core_Error::debug($form), the output is presented as text, which makes it difficult to investigate. enter image description here

I'd like to find a way to make the output of CRM_Core_Error::debug($form) more user-friendly and similar to Drupal's Devel module's expandable items. I tried using krumo($form), but it didn't work. Any suggestions? enter image description here

1 Answer 1


Yes, you can do similar to CRM_Core_Error::debug_var but using the html dumper:

$dumpForm = (new \Symfony\Component\VarDumper\Dumper\HtmlDumper('php://output'))
  ->dump((new \Symfony\Component\VarDumper\Cloner\VarCloner())->cloneVar($form));

and then there's little expandy triangles on the right of expandable lines:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.