innmind/debug
Composer 安装命令:
composer require innmind/debug
包简介
Set of tools to help debug applications
README 文档
README
Profiler client to help debug applications.
Installation
composer require --dev innmind/debug
Usage
use Innmind\Framework\{ Application, Main\Http, // this example also works with Main\Cli Middleware\Optional, }; use Innmind\Profiler\Web\Kernel as Profiler; use Innmind\Debug\Kernel as Debug; use Innmind\Url\Path; new class extends Http { protected function configure(Application $app): Application { return $app ->map(Optional::of( Debug::class, static fn() => Debug::inApp()->operatingSystem(), )) ->map(new YourAppKernel) ->map(Optional::of( Profiler::class, static fn() => Profiler::inApp(Path::of('var/profiler/')), )) ->map(Optional::of( Debug::class, static fn() => Debug::inApp()->app(), )); } };
The first middleware will record calls to the operating system, you can omit this middleware if you don't want to record it. This middleware is defined first so all decorators to the OperatingSystem will be recorded, such as redirections for http calls.
Note
if you don't want to record low level calls to the OS but the one initiated by your app you can define a single middleware via Optional::of(Debug::class, static fn() => Debug::inApp()) as the last middleware.
The Profiler middleware adds the route GET /_profiler/ where you'll find all the recorded profiles. The profiles are stored in the local var/profiler/ in clear text.
The last middleware is the one that initiates the recording of profiles.
统计信息
- 总下载量: 1.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-09