定制 innmind/debug 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

innmind/debug

Composer 安装命令:

composer require innmind/debug

包简介

Set of tools to help debug applications

README 文档

README

CI codecov Type Coverage

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固