PHP Logs in native console Firefox Developer

删除回忆录丶 提交于 2019-12-01 06:30:28

I just installed Chrome Logger ( github | website ) with Chrome PHP to accomplish this in Chrome since Firefox 50+ broke FirePHP. I then learned that Firefox's web console has been supporting Chrome Logger since v43 (https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Console_messages#Server).

So in short, yes, you can log PHP variables to the Firefox web console using Chrome PHP. It's this simple:

  1. Download the latest Chrome PHP library: https://github.com/ccampbell/chromephp
  2. Include it in your project (include 'ChromePhp.php';)
  3. Log something in your php script (ChromePhp::log($_MyArray);)
  4. Open Firefox web console and turn on the Server tab (https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Console_messages#Filtering_by_category)

Hope this helps. I procrastinated upgrading Firefox for a few years before discovering that newer versions had support for this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!