- In Vanilla magento2, the file path showing original file path as you can see in below screenshot the file path is showing from vendor after doc root.
- In one of my working project where cache path is showing.
- I am facing an issue in Xdebug where the debugger is stopping on cache files instead of actual file. Is this related Magneto configuration? If yes, can anyone share your thoughts on this.
-
What is the issue?– Aaron WangCommented Jan 11, 2023 at 20:56
-
@WangGang the main issue is cache path i.e var/view_preprocessed/pub/static should not show in template path. Usually while debugging we don't keep break point in cache file instead we keep it at actual file. Somehow due to this template path issue I have to keep break point at cache file.– Rajkumar VellaiswamyCommented Jan 13, 2023 at 9:11
1 Answer
When the minify HTML feature is enabled in your project, Magento will retrieve the phtml template files from the cached directory, specifically located in the var/view_preprocessed/pub/static
directory. As a result, when template hints are displayed, they will show the template path from the cache instead of the original file path.
To disable the minify HTML feature, use the following command:
bin/magento config:set dev/template/minify_html 0
Afterward, clear the config
cache type to see the changes by running the command:
bin/magento cache:clean config