Debugger D8 :

Editer le fichier services.yml (site/default) pour affecter "debug" à la valeur TRUE  dans la zone twig.config

Comme l'indique les commentaires, lorsque "debug" est à la valeur "true", le code HTML contiendra des commentaires concernant les informations de théming comme les suggestions pour les noms des fichiers de gabarit à utiliser.

twig.config:
    # Twig debugging:
    #
    # When debugging is enabled:
    # - The markup of each Twig template is surrounded by HTML comments that
    #   contain theming information, such as template file name suggestions.
    # - Note that this debugging markup will cause automated tests that directly
    #   check rendered HTML to fail. When running automated tests, 'debug'
    #   should be set to FALSE.
    # - The dump() function can be used in Twig templates to output information
    #   about template variables.
    # - Twig templates are automatically recompiled whenever the source code
    #   changes (see auto_reload below).
    #
    # For more information about debugging Twig templates, see
    # https://www.drupal.org/node/1906392.
    #
    # Not recommended in production environments
    # @default false
    # pour l'accès au debug pour les thèmes TRUE
    debug: true

Debugger D7 :

Editer le fichier settings.php  (site/default) pour affecter "$conf['theme_debug'] " à la valeur TRUE  dans la zone 'theme debugging" ( existe à partir de la version 7.33

/**
 * Theme debugging:
 *
 * When debugging is enabled:
 * - The markup of each template is surrounded by HTML comments that contain
 *   theming information, such as template file name suggestions.
 * - Note that this debugging markup will cause automated tests that directly
 *   check rendered HTML to fail.
 *
 * For more information about debugging theme templates, see
 * https://www.drupal.org/node/223440#theme-debug.
 *
 * Not recommended in production environments.
 *
 * Remove the leading hash sign to enable.
 */
 $conf['theme_debug'] = TRUE;