Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
qadan CreditAttribution: qadan as a volunteer commented+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.
Comment #3
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedto 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