Home > Backend Development > PHP Tutorial > Use of WHOOPS PHP debugging library

Use of WHOOPS PHP debugging library

不言
Release: 2023-03-24 21:20:01
Original
1676 people have browsed it

This article introduces the use of WHOOPS PHP debugging library, which has certain reference value. Now I share it with everyone. Friends in need can refer to it

Whoops error capture suitable for PHP environment And debugging PHP library; whoops is very easy to use, it provides stackbased error capture and super beautiful error viewing test results are as follows

Installation steps (composer installation )

After the installation is completed, create a new directory tools in the current directory, create a new whoops.php in the tools directory, and add the following code to register the monitoring class require

__DIR__."/../vendor/autoload.php";
$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();
Copy after login

Then you can test it. The code is as follows and the test effect picture is as above

whoops official website http:// filp.github.io/whoops/

Related recommendations:

whoops What is the php debugging library

The above is the detailed content of Use of WHOOPS PHP debugging library. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template