I have created a full symfony project (composer create-project composer create-project symfony / website-skeleton myproj "^ 4.4.18").
After having configured the environment variables (trusted_host, database_url, etc ...).
If I run php -S 127.0.0.1:8000 -t public /
=> Everything works perfectly. I have the symfony welcome page with the debug toolbar
On the other hand, if I access it from a host in my local docker workspace (I use nginx): everything appears fine like the other EXCEPT the debug toolbar
I have this error in my console. I don't know if it concerns
While for the docker environment, the php is in version 7.4.14 and with an xdebug v3.0.1 installed and activated.
and I even made sure that /var/cache/ was in chmod -R 777.
could someone help me display this debug toolbar?
My Answer:
) and I am running it in a docker container on my local machine. However, I am unable to see the Symfony debug toolbar when I access the website in my browser.
Here are a few things you can check to troubleshoot this issue:
1. Make sure that the Symfony profiler is enabled in your `config/packages/dev/web_profiler.yaml` file. It should look something like this:
yaml
web_profiler:
toolbar: true
2. Check that the `APP_ENV` environment variable is set to `dev` in your `.env` file. This is necessary for the debug toolbar to be displayed in the development environment.
3. Clear the cache by running the following command in your docker container:
bash
php bin/console cache:clear
4. Make sure that the `APP_DEBUG` environment variable is set to `true` in your `.env` file. This is also necessary for the debug toolbar to be displayed.
5. Check that the `APP_SECRET` environment variable is set in your `.env` file. The debug toolbar will not be displayed if this variable is not set.
6. Ensure that the necessary Symfony bundles are installed and configured correctly in your `config/bundles.php` file. The `Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class` should be included in the dev environment.
If you have checked all of the above and the debug toolbar is still not showing, you may want to try accessing the website using a different browser or clearing your browser cache. Additionally, you can try restarting your docker container to see if that resolves the issue.
I hope this helps you troubleshoot the problem and get the Symfony debug toolbar working in your local docker environment.
Rate this post
3 of 5 based on 5887 votesComments