5

In D7 using dmp() with Krumo in produced output like this:

enter image description here

Double clicking on a variable value, in this case "foobar" shows the path through the array to that value (the highlighted text in the image above).

Now with D8 it's using Kint not Krumo and produces output like this:

enter image description here

Is there anyway to copy the path to "foobar" using kint?

This is the text that I want: ['example']['#attributes']['class'][0]

  • Great question. Right now there is no way that I know of, I ran into the same issue. I used to copy the path in D7 with Search Krumo but as far as I can tell, there is no equivalent in D8 with Kint. This might be a good feature request for the Devel module but it definitely slows down development time in D8. – Danny Englander Apr 13 '16 at 1:04
  • Consider using xdebug instead. Since I've started debugging with xdebug & phpstorm I haven't looked back at DPM even once. – Eyal Apr 13 '16 at 5:01
  • Yeah - I do get xdebug out when the debugging gets really heavy but I also love a quick bit of dpm. Search krumo is an awesome module. Maybe I should just write search kint!?! – Felix Eve Apr 13 '16 at 5:24
  • @Eyal - Can you point us to a good tutorial on getting started with xdebug/phpstorm (with remote Drupal server if possible) ? – Nic Apr 13 '16 at 12:44
  • @NicCottrell look for the tutorials on phpstorm and xdebug. – Eyal Apr 13 '16 at 17:59
6

It seemed there was no solution so I just copied the search_krumo module and changed it a bit so it works with Drupal 8 and kint and made search_kint.

I've only just done the first push so isn't showing as a download yet; and there is only a development snapshot release, at the moment, but it's something to get started with.

So far, it has worked well with my testing.

EDIT: search_kint now has a full release.

| improve this answer | |
  • 1
    wow, fantastic, can't wait to try it! – Danny Englander Apr 13 '16 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.