Debugging the result property in a ViewExecutable I need to debug the $result property of the ViewExecutable object passed to hook_views_post_execute but for what ever reason, Drupal can't handle it. $view-&gt;result is an array of type ResultRow, and because it's an array, I'm attempting to log it like so:
\Drupal::logger('foo')-&gt;notice('&lt;pre&gt;' . print_r($view-&gt;result, TRUE) . '&lt;/pre&gt;');

When I do this and then load the view I'm attempting to mess with, it loads the page without css and then the recent log messages just shows up blank, no errors or anything that would actually be helpful.
I've tried a number of different ways but this is always the result. Why can't this logger print a simple array?
I've even tried looping through the array and printing just the value:
foreach($view-&gt;result as $key =&gt; $value) {
  \Drupal::logger('bar')-&gt;notice(print_r($value, true));
}

And that will render the view without css and then the logger doesn't print anything at all. I double checked and printed a regular string and that worked, but when I attempt to print the value it just breaks and doesn't do anything.
Your code works fine for me so perhaps your view has no results?
Anyways, the Drupal log is not really meant to be used for printing variables for debugging purposes. Use an appropriate tool like Devel which has/comes with another module called Kint, enable Kint.
use Drupal\views\ViewExecutable;

/**
 * Implements hook_views_post_execute()
 */
function mymodule_views_post_execute(ViewExecutable $view) {
  kint($view-&gt;result);
}

Flush cache and you'll see this

For more info on how to use Kint, see Welcome to Kint 101