When using ksm it would be nice if the same messages repeat. That way it would be easier to test loops (producing the same output).

function ksm() {
  kint_require();
  if (\Drupal::currentUser()->hasPermission('access kint')) {
    $args = func_get_args();
    $msg = @Kint::dump($args);
    drupal_set_message(Markup::create($msg), 'status', TRUE);
  }
}

Comments

jokle created an issue.

qadan’s picture

+1 to this; thinking that given it's a development function, it should really do what the dev asks without 'cleaning it up' for display purposes.

Nicolas Bouteille’s picture

to test loops (producing the same output) you can use devel.dumper that logs output to tmp/drupal_debug.txt
https://drupal.stackexchange.com/a/216706