For some reason I couldn't use devel to debug output object arrays. Is there a way to output the array data to watchdog error reporting? This would also solve the issue of having to install or enable another module.
watchdog( 'my_module_name', 'Here is the printed variable: <pre>@placeholder_name</pre>', array('@placeholder_name' => print_r( $my_variable, TRUE)), WATCHDOG_INFO );
Also, convention dictates that the first parameter,
$type, should be the module name calling watchdog.
If you don't mind enabling another module, though, I wrote Object Log for just this kind of thing:
It's lightweight, easier to use in code, more user-friendly to view, and doesn't get pushed down the log as other log events are recorded.