Skip to content

Commit 8e54983

Browse files
committed
readme tweaks
1 parent 52eb4e2 commit 8e54983

1 file changed

Lines changed: 21 additions & 13 deletions

File tree

readme.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
PHPDebugConsole WAMP Plugin Client
1+
PHPDebugConsole WAMP Plugin/Client
22
===============
33

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

6-
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 output.
6+
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.
77

88
All [PHPDebugConsole](https://github.com/bkdotcom/PHPDebugConsole) methods are supported.
99

1010

1111
### Overview
1212
There are 3 parts to this logging solution.
1313

14-
* This client. Think of this as an undocked (separate-windowed) browser console. Instead of viewing javascript info, it's PHP stuff<sup>†</sup>.
14+
* This client. Think of this as an undocked (separate-windowed) browser console. Instead of viewing javascript stuff, it's PHP stuff<sup>†</sup>.
1515
* The PHP application thats "publishing" log messages (via [PHPDebugConsole](https://github.com/bkdotcom/PHPDebugConsole))
1616
* [A WAMP (websockets protocol) router](http://wamp-proto.org/implementations/#routers) that serves as a middle man between this client and the PHP application
1717

@@ -22,28 +22,33 @@ All 3 components *can* be be running on the same server/environment, or be on 3
2222

2323
### Installation
2424

25-
**Download Composer** (if not already installed) [more info](https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable)
25+
**Download Composer** (if not already installed) [more info](https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable)
2626
`$ curl -sS https://getcomposer.org/installer | php`
2727

2828
**create a project directory in your webroot**
2929

3030
$ mkdir debugWampClient
3131
$ cd debugWampClient
3232

33-
**Install this client**
33+
**Install this client**
34+
35+
(make sure you're in the project directory)
36+
3437
`$ php composer.phar require bdk/debug-wamp-client`
3538

36-
**Install a WAMP router** (if you don't already have one)
39+
**Install a WAMP router** (if you don't already have one)
3740
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)*
38-
One client+router install can support many PHPDebugConsole projects
41+
One client+router install can support many PHPDebugConsole projects
3942
`$ php composer.phar require voryx/thruway`
4043

41-
**Start the WAMP router.**
44+
**Start the WAMP router.**
4245
`$ php vendor/voryx/thruway/Examples/SimpleWsRouter.php`
43-
*(note that the router doesn't play well with x-debug. You will likely need to disable x-debug for this process)*
46+
*(note that the router doesn't play well with x-debug. You will likely need to disable x-debug for this process. See [this gist](https://gist.github.com/bkdotcom/4b635f7c7c07dd5800dee89cdb99e4f6))*
4447

4548
**Create an `index.php` for the client**
4649

50+
(this index.php should be created in the project directory)
51+
4752
```php
4853
<?php
4954

@@ -54,15 +59,15 @@ $debug = \bdk\Debug::getInstance();
5459
new \bdk\Debug\WampClient($debug);
5560
```
5661

57-
**Navigate to the client in your browser**
62+
**Navigate to the client in your browser**
5863
`http://localhost/debugWampClient`
5964

6065
The client should have connected to the router and is ready to receive log messages
6166

62-
**Add PHPDebugConsole to the project you wish to debug**
67+
**Add PHPDebugConsole to the project you wish to debug**
6368
`$ php composer.phar require bdk/debug`
6469

65-
**Install a PHPDebugConsole/outputWamp plugin dependency**
70+
**Install a PHPDebugConsole/outputWamp plugin dependency**
6671
`$ php composer.phar require bdk/wamp-publisher`
6772

6873
Add the OutputWamp plugin to your application
@@ -75,6 +80,9 @@ $debug = new \bdk\Debug(array(
7580
$wampPublisher = new \bdk\WampPublisher(array(
7681
'realm'=>'debug'
7782
));
78-
$outputWamp = new \bdk\Debug\OutputWamp($debug, $wampPublisher);
83+
$outputWamp = new \bdk\Debug\Output\Wamp($debug, $wampPublisher); // see note below
7984
$debug->addPlugin($outputWamp); // or $debug->setCfg('outputAs', $outputWamp); to prevent the default in-page html output
8085
```
86+
87+
\* The wamp-plugin classname changed in PHPDebugConsole v2.1. If you're using pre 2.1 use:
88+
`new \bdk\Debug\OutputWamp($debug, $wampPublisher);`

0 commit comments

Comments
 (0)