We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36805
    • 354 Posts
    For debugging purposes I would love to use FirePHP to output some server side arrays to Firebug.

    I tried but failed to use FirePHP from my plugin code. I keep getting the headers already sent exception message.

    Is it possible to do this in Evo? I tried doing the include in the plugin itself. Later i moved that to the manager/index.php. Also in both cases I tried wrapping an ob_start(); ob_flush; around the include.

    Any help would be very much appreciated.
      • 36805
      • 354 Posts
      *bump*
        • 36805
        • 354 Posts
        Today it took another shot the simplest way possible and it worked. I just attach a plugin to event OnWebPagePrerender with the code
        require_once MODX_BASE_PATH.'includes/firephp/lib/FirePHPCore/fb.php';
        fb::info('fb loaded');

        If you need to output some variables OnDocFormSave it is not possible. I think this is because of some forwarding going resulting in a new request where the event does not need to fire.

        In that case boldly use
        print_r($yourVar); exit;