You can get the variables defined in the current scope using the get_defined_vars () method and register it using the Monolog
library, for example,
$this->container->get('logger')->info('Local variables', get_defined_vars());
I would recommend installing the FirePHP extension in Firefox, because in dev mode FirePHP
handler automatically turns on so you can see informational messages in the firebug console. For more information about registering the journal of this cookbook entry .
source share