承接 bdk/debug-wamp-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

bdk/debug-wamp-client

Composer 安装命令:

composer require bdk/debug-wamp-client

包简介

Html/Javascript WAMP based debug client used in conjunction with PHPDebugConsole on the server

README 文档

README

Debug your PHP applications (both web and console) in realtime.

Debug/log information is sent completely "out-of-bounds" via websockets. Since log data isn't sent in the message body or headers of your application, we can debug any request method (including ajax and console application) without affecting the application's output.

All PHPDebugConsole methods are supported.

Overview

There are 3 parts to this solution.

  • This client. Think of this as an undocked (separate-windowed) browser console. Instead of viewing javascript stuff, it's PHP stuff.
  • A WAMP (websockets protocol) router that serves as a middle man between this client and the PHP application
  • The PHP application thats "publishing" log messages (via PHPDebugConsole)

All 3 components can be be running on the same server/environment, or be on 3 separate servers, it doesn't matter. I imagine in most cases, this client and the router will be installed on a local dev environment... aka your laptop.

† PHPDebugConsole also supports output via plain 'ol <script> output, ChromeLogger, & FirePHP.. This WAMP solution isn't limited by what the browser's console can do and offers all of the same formatting and features of PHPDebugConsole's HTML output without the disadvantages of being included in the output of your application (or not supported with ajax & CLI applications.

Installation

Prerequisite : Install Composer

Download Composer (if not already installed) more info
$ curl -sS https://getcomposer.org/installer | php

1. Client

create a project directory in your webroot

$ mkdir debugWampClient
$ cd debugWampClient

Install this client

(make sure you're in the project directory)

$ php composer.phar require bdk/debug-wamp-client

Create an index.php for the client

(this index.php should be created in the project directory)

<?php

require __DIR__ . '/vendor/autoload.php';

// we pass a debug instance so that the client can use the javascript & css it provides
$debug = \bdk\Debug::getInstance();
new \bdk\Debug\WampClient($debug);

2. Router

Install a WAMP router (if you don't already have one)
If you don't already have a WAMP router up and running, you might as well install a PHP-based one here in the same folder (but again, it could be installed anywhere, or be a node based router) One client+router install can support many PHPDebugConsole projects $ php composer.phar require voryx/thruway

Start the WAMP router.
$ php vendor/voryx/thruway/Examples/SimpleWsRouter.php (note that the router doesn't play well with x-debug. If you have x-debug installed, you will likely need to disable it for this process. See this gist)

3. Application You're Debugging

Add PHPDebugConsole and WAMP dependency to the project you wish to debug

$ php composer.phar require bdk/debug
$ php composer.phar require bdk/wamp-publisher

Bootstrap PHPDebugConsole with the WAMP output plugin

require __DIR__.'/vendor/autoload.php'

$debug = new \bdk\Debug(array(
    'collect' => true,
));
$debug->addPlugin($debug->routeWamp);   // or $debug->setCfg('route', 'wamp'); to only output via the wamp plugin

Everything's setup and ready

Navigate to the client in your browser
http://localhost/debugWampClient

The client should connect to the router and is ready to receive log messages

bdk/debug-wamp-client 适用场景与选型建议

bdk/debug-wamp-client 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 275 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 10 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「debug」 「debugging」 「var_dump」 「WAMP」 「errorhandler」 「wampws」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 bdk/debug-wamp-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bdk/debug-wamp-client 我们能提供哪些服务?
定制开发 / 二次开发

基于 bdk/debug-wamp-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 275
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 30
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-09