Skip to content

Commit c69b97b

Browse files
committed
Update docs
1 parent 5a31249 commit c69b97b

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
### 1.5.0 (29 May 2016)
3+
### 1.5.0 (03 Jun 2016)
44
* Fix: Fixes "PHP Warning: session_start(): Cannot send session cache limiter - headers already sent" notice in logs
55
* Misc: Internal changes, new Settings class, deprecated methods and properties in main Plugin class
66
* Misc: Updated PHP Console Library to 3.1.6

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@
77

88
An implementation of [PHP Console](https://github.com/barbushin/php-console "PHP Console") as a [WordPress](http://www.wordpress.org) plugin. Use Chrome Dev Tools to debug your WordPress installation!
99

10-
<sup>Note: this is the development repository. If you download a zip from the master branch here you'll also need to build the plugin using `npm install` and then `grunt build` since it uses composer to manage dependencies. Or you can simply download the packaged plugin in the latest publicly released version from [wordpress.org]((https://wordpress.org/plugins/wp-php-console/)) and you'll be ready to go.</sup>
11-
1210
## Description
1311

1412
> PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things using [Google Chrome extension PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef) and [PHP Console server library](https://github.com/barbushin/php-console).
1513
16-
This implementation of PHP Console makes easy to debug a WordPress installation from Chrome browser JavaScript console and test any WordPress specific function or class (including those introduced by your active theme and plugins!) from a terminal. You can run any PHP or WordPress specific function and inspect results, catch errors and warnings with call stack trace straight which will be displayed in the Chrome JavaScript console. You can do PHP debugging alongside your JavaScript debugging in one place, without having PHP to print errors and warnings in your HTML page.
14+
This implementation of PHP Console is a handy tool to make it easier to test on the fly any WordPress specific function or class (including those introduced by your active theme and plugins!) from a terminal and inspect results, catch errors and warnings with complete call stack trace straight from the Chrome JavaScript console. In other words, besides debugging, you can execute PHP or WordPress-specific PHP code straight from the terminal and print PHP variables in Chrome Dev Tools JavaScript console along with your normal JavaScript debugging and testing. Keep everything in one place, without leaving the browser to check for your logs or writing temporary PHP test code on a PHP file and refresh your browser page.
1715

1816
[![Download from WordPress.org](https://github.com/nekojira/wp-php-console/blob/master/assets/wordpress-download-btn.png)](https://wordpress.org/plugins/wp-php-console/)
1917

2018

2119
## Installation
2220

23-
Note: you will need PHP 5.4.0 minimum version on your machine or server to run this plugin.
21+
Note: you will at least PHP 5.4.0 or above installed on your machine or server to run this plugin.
2422

2523
1. First, install [Google Chrome extension PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef) from the [Chrome WebStore](https://chrome.google.com/webstore/search/php%20console?_category=extensions).
2624
Make sure the PHP Console Chrome extension is enabled through [chrome://extensions/](chrome://extensions/ "chrome://extensions/").

readme.txt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Use Chrome Dev Tools to debug your WordPress installation!
1515

1616
> PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things using [Google Chrome extension PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef) and [PHP Console server library](https://github.com/barbushin/php-console).
1717

18-
This implementation of PHP Console offers yet another tool to make it more easy to test on the fly any WordPress specific function or class (including those introduced by your active theme and plugins!) from a terminal and inspect results, catch errors and warnings with call stack trace straight from the Chrome JavaScript console. In other words, besides debugging, you can execute PHP or WordPress-specific PHP code straight from the terminal and print PHP variables in Chrome Dev Tools JavaScript console as if it were Javascript. It's very handy to keep everything in one place.
18+
This implementation of PHP Console is a handy tool to make it easier to test on the fly any WordPress specific function or class (including those introduced by your active theme and plugins!) from a terminal and inspect results, catch errors and warnings with complete call stack trace straight from the Chrome JavaScript console. In other words, besides debugging, you can execute PHP or WordPress-specific PHP code straight from the terminal and print PHP variables in Chrome Dev Tools JavaScript console along with your normal JavaScript debugging and testing. Keep everything in one place, without leaving the browser to check for your logs or writing temporary PHP test code on a PHP file and refresh your browser page.
1919

20-
Note: PHP 5.4.0 minimum version is required to use this plugin.
20+
Note: PHP version 5.4.0 or above is required to use this plugin.
2121

2222
For support and pull requests, please refer to [WP PHP Console GitHub repo](https://github.com/unfulvio/wp-php-console) and read the instructions there - thank you.
2323

@@ -68,7 +68,7 @@ The result includes the output, the return value and the net server execution ti
6868

6969
In your PHP code on the Server, you can call PHP Console debug statements like `PC::debug( $var, $tag )` to display PHP variables in the JavaScript console and optionally filter selected tags through the PHP Console eval & options form opened from the address bar in your browser.
7070

71-
In the JavaScript console you will see printed any PC::debug() information, PHP errors, warnings, notices with optional stack trace, which will be useful to debug your plugin or theme.
71+
In the JavaScript console you will see printed any `PC::debug()`` information, PHP errors, warnings, notices with optional stack trace, which will be useful to debug your plugin or theme.
7272

7373
== Frequently Asked Questions ==
7474

@@ -84,6 +84,10 @@ No it doesn't, unless PHP Console browser extension is ported, for example, as a
8484

8585
You *can* but it is probably not a good idea. You should do your debugging and testing on a development/testing environment on a staging server or local machine. Likewise, you normally wouldn't want to turn on PHP error reporting or set WP_DEBUG to true in a live site as you wouldn't want to display error information to public. Furthermore, PHP Console allows execution of any remote PHP code through terminal - for this you can set a strong password and restrict the IP address range to access the terminal, but still it's not advisable. Besides putting your site at risk, you will also add more load to your server.
8686

87+
= Will there be items logged in my debug.log files when a PHP error occurs? =
88+
89+
Generally no, WP PHP Console will intercept those. However, it's always a good idea to keep an eye on the logs too. Furthermore, WP PHP Console is unable to catch many server errors that result in a 500 error code on the browser. For those you may have traces left in the debug.log file.
90+
8791
= Why are PHP arrays shown as objects? =
8892

8993
The JavaScript console prints PHP variables as JavaScript variables. Associative PHP arrays such as `['key1' => 'var2', 'key2' => 'var2', ... ]` are shown as objects; automatically indexed arrays like `[ 'var1', 'var2', ... ]` are shown as arrays.
@@ -96,9 +100,9 @@ You could move your debug code or either do something like
96100

97101
`
98102
// delay use of PC class until WP PHP Console plugin is included
99-
add_action('plugins_loaded', function () use ($my_var) {
103+
add_action( 'plugins_loaded', function () use ( $my_var ) {
100104
// send $my_var with tag 'my_tag' to the JavaScript console through PHP Console Server Library and PHP Console Chrome Plugin
101-
PC::my_tag($my_var);
105+
PC::my_tag( $my_var );
102106
});
103107
`
104108

@@ -109,10 +113,10 @@ or
109113
require_once dirname( __FILE__ ) . '/wp-php-console/vendor/autoload.php';
110114

111115
// make PC class available in global PHP scope
112-
if( !class_exists( 'PC', false ) ) PhpConsole\Helper::register();
116+
if ( ! class_exists( 'PC', false ) ) PhpConsole\Helper::register();
113117

114-
// send $my_var with tag 'my_tag' to the JavaScript console through PHP Console Server Library and PHP Console Chrome Plugin
115-
PC::my_tag($my_var);
118+
// send $my_var with tag 'my_tag' to the JavaScript console through PHP Console Server Library and PHP Console Chrome Plugin
119+
PC::my_tag( $my_var );
116120

117121
`
118122

0 commit comments

Comments
 (0)