Find out which theme is loaded in a given page I am trying to do some theming for Drupal 8 and I was trying to understand what theme is being used on a given page. I remember using theme developer module in Drupal 7, and using dpm() of the page array after theme developer started having issues.

How can I achieve the same with Drupal 8?
In Drupal 8, you can do two things from custom code:

\Drupal::theme()-&gt;getActiveTheme();

\Drupal::theme()-&gt;getActiveTheme()-&gt;getName();


The first will return a theme object, the second will return just the theme name.

See the ThemeManager docs for more details.

You can also install Devel/WebProfiler for more information about the current page request and other variables.