Jump to content

Prestashop 1.7, set Symfony “_profiler” ON to analyse request, and to be able to use `dump($someVariable)` in `hookAction[action name]`


Recommended Posts

The question is also on SO here.

I am figuring out how Prestashop 1.7 works and I have some experience with Symfony.

In Symfony development mode  `[Symfony project url]/_profiler` is useful, among other things, to check the `dump($someVariable)` of variables in a request.

With Prestashop 1.7 in the **admin mode** it is possible to do `[Prestashop project url]/admin[some random chain of chars]/_profiler` to display the Symfony `_profiler` and analyse what's going on in the requests concerning the admin mode.

But if outside the admin mode (in the **virtual shop demo mode**),   `[Prestashop project url]/_profiler` or `[Prestashop project url]/[language value]/_profiler` **does not display the Symfony `_profiler`**.

I have tried Prestashop own profiler by activating `define('_PS_DEBUG_PROFILING_', true);` in `[prestashop project]/config/defines.inc.php`. It displays Prestashop profiler at the bottom of the "virtual shop demo mode" but this one does not include `dump($someVariable)` that could be used, for development and to understand Prestashop behaviour, in a `hookAction[action name]`.

I've managed to get the Symfony `dump($someVariable)` with `hookDisplay[display name]` through the HTML generated **but not in a `hookAction[action name]`** which is what I am looking for.

**UPDATE**
Looking at Prestashop 1.7 code I almost have the feeling that Symfony is only used on the Admin side, because I can see:
`$kernel = new AppKernel(_PS_MODE_DEV_?'dev':'prod', _PS_MODE_DEV_);` in `[Prestashop project url]/admin[some random chain of chars]/index.php` but I don't see it in `[Prestashop project url]/index.php`.
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...