📜 ⬆️ ⬇️

How to make PHP friendly with the Google Chrome console

Attention

This article contains information about the outdated version of PHP Console.

Read about the new version of PHP Console 3.0 here .

PHP Console 1.0


')


It will be a question of one marvelous extension for Google Chrome, which allows you to proxy error output and debugging messages from PHP to the Google Chrome console, as well as display them as pop-up popup notifications.

The PHP Console extension was written as a plugin for a fairly high-quality and functional error handler - Lagger . If the Lagger functionality is redundant for you, then you can use the compact PhpConsole class. A list of what it can do more:

✓ There is no icon in the toolbar, all settings are made from the context menu
✓ Proxies error / debug messages to the Google Chrome console.
✓ Displays error / debugging messages in the form of temporary popup notifications.
✓ The first notification is displayed within 3 seconds.
✓ The display time of all other notifications is configured
✓ The notification does not disappear if you click on it or hover the mouse
✓ All notifications can be closed by clicking on the icon (x) to close the popup.
✓ Displays the backtrace of the error call / exception in the console (click on Object)
✓ Displays the backtrace of the error / exception call in the notification (click on the link # file_path)
✓ Displays javascript errors in the form of temporary popup notifications.
✓ Does not override the custom JavaScript error handler.
✓ The error URL is clickable and opens the source code of the script / page.
✓ Ignores repetitive errors.
✓ Ignores internal errors in Google Chrome extensions.
✓ Catch messages from scripts from any sources.
✓ Webpage
✓ AJAX
✓ IFrame
✓ Additional actions are available for logging messages (using Lagger)
✓ Save to log file
✓ Email Sending
✓ Send to FirePHP
✓ Sending by SMS

How is it better than the same FirePHP:
  1. Normally handles fatal errors.
  2. Traps messages in AJAX scripts and IFrames
  3. It has a very convenient function to display messages in pop-up notifications.
  4. Displays call backtrace
  5. Catches javascript errors
  6. Supports a more functional and highly configurable Lagger library
For all questions arising with the use of PHP Console and Lagger, feel free to contact the author, i.e. to me.

Your comments and suggestions are very welcome :)
Successful use!

PS I know that on Habré extremely negative attitude to all kinds of "bicycles", so please do not judge strictly - write comments, ask, I will be happy to discuss and explain any moment.

Source: https://habr.com/ru/post/107810/


All Articles