You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+41-24Lines changed: 41 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,41 +8,40 @@ Debug/log information is sent completely "out-of-bounds" via websockets. Since
8
8
All [PHPDebugConsole](https://github.com/bkdotcom/PHPDebugConsole) methods are supported.
9
9
10
10
### Overview
11
-
There are 3 parts to this logging solution.
11
+
There are 3 parts to this solution.
12
12
13
13
* This client. Think of this as an undocked (separate-windowed) browser console. Instead of viewing javascript stuff, it's PHP stuff<sup>†</sup>.
14
-
* The PHP application thats "publishing" log messages (via [PHPDebugConsole](https://github.com/bkdotcom/PHPDebugConsole))
15
14
*[A WAMP (websockets protocol) router](http://wamp-proto.org/implementations/#routers) that serves as a middle man between this client and the PHP application
15
+
* The PHP application thats "publishing" log messages (via [PHPDebugConsole](https://github.com/bkdotcom/PHPDebugConsole))
16
16
17
17
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.
18
18
19
19
> † 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.
20
20
21
21
### Installation
22
22
23
+
24
+
#### Prerequisite : Install Composer
25
+
23
26
**Download Composer** (if not already installed) [more info](https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable)
**Install a WAMP router** (if you don't already have one)
38
-
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)*
39
-
One client+router install can support many PHPDebugConsole projects
*(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))*
45
-
46
45
**Create an `index.php` for the client**
47
46
48
47
(this index.php should be created in the project directory)
**Install a WAMP router** (if you don't already have one)
62
+
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)*
63
+
One client+router install can support many PHPDebugConsole projects
64
+
`$ php composer.phar require voryx/thruway`
62
65
63
-
The client should have connected to the router and is ready to receive log messages
*(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](https://gist.github.com/bkdotcom/4b635f7c7c07dd5800dee89cdb99e4f6))*
64
69
65
-
**Add PHPDebugConsole to the project you wish to debug**
66
-
`$ php composer.phar require bdk/debug`
70
+
----
71
+
#### 3. Application You're Debugging
67
72
68
-
**Install a PHPDebugConsole/outputWamp plugin dependency**
69
-
`$ php composer.phar require bdk/wamp-publisher`
73
+
**Add PHPDebugConsole and WAMP dependency to the project you wish to debug**
70
74
71
-
Add the OutputWamp plugin to your application
75
+
```
76
+
$ php composer.phar require bdk/debug
77
+
$ php composer.phar require bdk/wamp-publisher
78
+
```
79
+
80
+
Bootstrap PHPDebugConsole with the WAMP output plugin
72
81
73
82
```php
74
83
require __DIR__.'/vendor/autoload.php'
@@ -83,5 +92,13 @@ $outputWamp = new \bdk\Debug\Output\Wamp($debug, $wampPublisher); // see note b
83
92
$debug->addPlugin($outputWamp); // or $debug->setCfg('outputAs', $outputWamp); to prevent the default in-page html output
84
93
```
85
94
86
-
\* The wamp-plugin classname changed in PHPDebugConsole v2.1. If you're using pre 2.1 use:
0 commit comments