maximebf / php-debugbar

Debug bar for PHP
phpdebugbar.com
MIT License
4.2k stars 401 forks source link

Option to embed JS and CSS inline #327

Open janwalther opened 7 years ago

janwalther commented 7 years ago

In my setup the webserver allows public access only to the folder where the front controller is located in (/var/www/html/public). When trying to use php-debugbar it tries to embed JS and CSS files:

<link rel="stylesheet" type="text/css" href="/vendor/maximebf/debugbar/src/DebugBar/Resources/openhandler.css">
<script type="text/javascript" src="/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/jquery/dist/jquery.min.js"></script>

The problem is that the vendor folder is not publicly accessible (for security reasons) and thus those CSS and JS files cannot be loaded. That is why I would appreciate a setting to embed JS and CSS code inline.

barryvdh commented 7 years ago

You can dump them directly, see http://phpdebugbar.com/docs/rendering.html#rendering