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

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

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

bdk/debug-wamp-client

最新稳定版本:v3.5

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

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固