Tips for using Kint in Drupal Twig development

The contents of a object being printed with Kint
Kint showing a selection of the available methods on a Drupal Node object

Set a maximum number of levels for Kint to recurse through objects and references

Be careful of the + button

After clicking on ‘node Drupal\node\Entity\Node’ to open the widget
After clicking the plus button to open the widget. Note how each level has been expanded, at cost to the browser Javascript thread which hung for quite a few seconds.



I’m an accomplished developer with a wide range of skills, knowledge, and experience, particularly focussed on accessibility and frontend web performance.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store