Download the PHP package bdk/debug-wamp-client without Composer
On this page you can find all versions of the php package bdk/debug-wamp-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bdk/debug-wamp-client
More information about bdk/debug-wamp-client
Files in bdk/debug-wamp-client
Package debug-wamp-client
Short Description Html/Javascript WAMP based debug client used in conjuction with PHPDebugConsole on the server
License MIT
Homepage http://github.com/bkdotcom/DebugWampClient
Informations about the package debug-wamp-client
PHPDebugConsole WAMP Plugin/Client
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
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)
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
Bootstrap PHPDebugConsole with the WAMP output 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