Just started playing about with Magento 2.

Can anyone tell me where I can find the "Template Path Hints" option that used to be in System > Configuration > Developer > Debug?

up vote 51 down vote accepted

You can only see some settings in developer mode. So first of all check that you are in developer mode, if not then run this command php bin/magento deploy:mode:set developer in root directory.

Then go to admin panel:

For Front End:

Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes


For Admin :

Store > Configuration > Advanced > Developer > Debug > Enabled
Template Path Hints for Admin > Yes

  • I have enabled but not able to see hints on either frontend or admin dashboard – siddhesh Jul 13 '17 at 14:20
  • 2
    Note that this menu item is visible in developer mode only. php bin/magento deploy:mode:set developer – Andreas Riedmüller Feb 24 at 10:11
  • @rakesh can you please help me on this? magento.stackexchange.com/questions/246502/… – Nagaraju Kasa Oct 22 at 10:16
  • I have followed your post which you have provide for by default selection for options while loading the page prnt.sc/l8xn28 – Nagaraju Kasa Oct 22 at 10:19
  • Not sure this is still true for 2.2.6, and will use n98 command line option. – camdixon Oct 24 at 4:33

Go to admin

For Front End:

Stores > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes

For Admin :

Stores > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Admin > Yes

You can do it by two ways:

  1. Using cli:

goto you project root directory on command line and run below command

php bin/magento dev:template-hints:enable 

php bin/magento dev:template-hints:disable 
  1. go to admin backend:

    Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes

    Stores > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Admin > Yes

    Stores > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Add Block Names to Hints > Yes

enter image description here

Hope, this will help some extend.

If you use n98-magerun2 script from https://github.com/netz98/n98-magerun2

Run the following from website root to enable hints

n98-magerun2.phar dev:template-hints --on

And this to disable

n98-magerun2.phar dev:template-hints --off
  • 2
    enable / disable is not a valid argument to pass, therefore will not do as you have described. The function will toggle without that argument. The correct argument to pass is the store code. github.com/netz98/n98-magerun#template-hints – Tisch Feb 23 '17 at 11:11
  • Technically it is correct, the store code default is added by... default. :) and in situations where admin is needed, admin is used. Majority of stores are usually running one store view/website. n98-magerun does a good job detecting your default view also: github.com/netz98/n98-magerun/blob/… If you're trying to only target a non-default store code, then yes the argument would be required, but without still technically NOT invalid. – B00MER Jun 13 '17 at 1:02

With command line we can also disable/enable path hint in Magento 2.2

For Enable

php bin/magento dev:template-hints:enable 

For Disable

php bin/magento dev:template-hints:disable

If you are connected to database, you can enable by running below query,

For Frontend:

update core_config_data set value = 1 where path = 'dev/debug/template_hints_storefront'

For Admin:

update core_config_data set value = 1 where path = 'dev/debug/template_hints_admin'
  • this is not in magento2 – Sushivam Mar 2 '17 at 9:54
  • This will work for Magento 2 as well. please check SELECT * FROM core_config_data` WHERE path LIKE '%dev/debug%'` – Mahendra Jella Mar 2 '17 at 10:09

If you don't worry about using a free extension I'd suggest this one:

https://github.com/ho-nl/magento2-Ho_Templatehints

Ho_Templatehints extends the default Magento template hints.

  • Easily accessible with with muscle memory ?ath=1.
  • Shows hints for Templates, AbstractBlocks (Blocks), Containers and UI Components.
  • No layout interference: Using css outline instead of borders of other HTML elements, so it doesn't f'up the layout.

Not really an answer to the question, but hopefully useful if you work with template hints or want to debug layouts/templates.

As Magento 1 provided, similarly Magento 2 providing with additional Option "Enabled Template Path Hints for Admin"

Go to admin ->

Store -> Configuration -> Advanced -> Developer -> Debug -> Enabled Template Path Hints for Storefront -> Yes

Store -> Configuration -> Advanced -> Developer -> Debug -> Enabled Template Path Hints for Admin -> Yes

  • 1
    Other answers already covered this way – 7ochem Dec 19 '17 at 11:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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