Jump to content

The easiest way to toggle debug mode conditionally using a cookie


Recommended Posts

In PrestaShop 9, you can define a cookie that controls the debug mode.

Thus, you don't have to enable debug mode for everyone and potentially cause disruption and you do not have to edit any file manually to setup a debug condition.

Using the Xdebug Chrome Extension, you can easily toggle the XDEBUG_SESSION cookie and enable the debug mode only for you.

I made a short video to show you this simple trick directly

Cookie name:

XDEBUG_SESSION

(Other possible values: XDEBUG_TRACE / XDEBUG_PROFILE)

Cookie value: Any password-like value of your choice. This will prevent others from seeing your shop in debug mode.

Extension name: Xdebug Chrome Extension / There is also "Xdebug Helper by JetBrains" / Xdebug Helper for Firefox

I used PrestaShop 9.0.2 to demonstrate this. Older versions might not have this feature.

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...