For some time this has been in drupal 7, ported from drupal 8
https://www.drupal.org/node/2307505
But not really mentioned much. Its a nice feature where you get directly in your html template file names you can use for changing html.
Looking like this
so you done need to DPM and see what is what for each content part, just have it all there. How to activate it?
Just set variable to TRUE
variable_set('theme_debug', TRUE);
and dont forget to make it FALSE for live sites :)
It is using new core function _theme_render_template_debug
https://api.drupal.org/api/drupal/includes%21theme.inc/function/_theme_…
that was "ported" some time ago from drupal 8 twig
https://www.drupal.org/node/2307505
It is also possible to do this with setting variable in settings.php
$conf['theme_debug'] = TRUE;
Or You can enable it with drush using:
drush vset theme_debug 1
And disable using
drush vset theme_debug 0