2017 © Pedro Peláez
 

wordpress-plugin wp-php-console

A WordPress implementation of PHP Console.

image

nekojira/wp-php-console

A WordPress implementation of PHP Console.

  • Wednesday, May 9, 2018
  • by unfulvio
  • Repository
  • 5 Watchers
  • 63 Stars
  • 74 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 2 Open issues
  • 14 Versions
  • 54 % Grown

The README.md

WP PHP Console

GitHub version Scrutinizer Code Quality, (*1)

An implementation of PHP Console as a WordPress plugin. Use Chrome Dev Tools to debug your WordPress installation!, (*2)

Description

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 and PHP Console server library., (*3)

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., (*4)

Download from WordPress.org, (*5)

Installation

Note: you will at least PHP 5.6.0 or above installed on your machine or server to run this plugin., (*6)

  1. First, install Google Chrome extension PHP Console from the Chrome WebStore. Make sure the PHP Console Chrome extension is enabled through chrome://extensions/., (*7)

    Important Note, (*8)

    If the Google Chrome extension is not available on the Chrome Web Store, you can manually install it from source., (*9)

  2. Then, add this plugin to your WordPress installation either by:, (*10)

  • Installing it as any other WordPress plugin from your WordPress admin Plugins page (Add New)., (*11)

  • Downloading a copy from WordPress.org and uploading it in wp-php-console directory into your wp-content/plugins/ directory or corresponding plugins directory in your installation. You can also do this from the WordPress plugins installation admim dashboard pages., (*12)

  • Note: If you decide to git clone this repository instead, you will need composer install to install its dependencies first, or it won't work in WordPress as it is., (*13)

  1. Activate the plugin through the Plugins admin page in WordPress, (*14)

  2. In the Settings menu go to WP PHP Console:, (*15)

  • Enter a password for the Eval Terminal (this setting is needed or the terminal feature simply won't work)., (*16)

  • You can also set other options (see inline instructions or read below)., (*17)

Options

Allow only on SSL

Forces PHP Console to connect on a SSL connection only (of course then if you don't actually have SSL (https), PHP Console simply won't work)., (*18)

Allowed IP Masks

You can secure your server by specifying IP addresses to restrict the accessibility from the Eval Terminal (a single address eg. 192.168.0.4 or an address mask eg. 192.168.*.* or multiple IPs, comma separated 192.168.1.22,192.168.1.24,192.168.3.*). In case of having issues connecting with the Remote PHP Eval Terminal, try leaving this blank., (*19)

Register PC Class

Tick this option to register PC in the global PHP namespace. This allows to write PC::debug($var, $tag) or PC::magic_tag($var) instructions in PHP to inspect $var in the JavaScript console., (*20)

Show Call Stack

Tick this option to see the call stack when PHP Console server writes to the JavaScript console., (*21)

Short Path Names

Tick this checkbox to shorten PHP Console error sources and traces paths in the JavaScript console. E.g. paths like /server/path/to/document/root/WP/wp-admin/admin.php:38 will be displayed as /WP/wp-admin/admin.php:38, (*22)

Usage

After you entered WP PHP Plugin password, your browser address bar should show a yellow "key" icon, which, if clicked, will prompt for the password you have set earlier. The "key" icon will change into a "terminal" icon, click on it to open the PHP Console eval & options form., (*23)

After entering the correct password, you can use the Eval Terminal in the PHP Console eval & options form and run any PHP code from it, including WordPress's own functions: enter one or more lines of PHP code in the black Eval terminal screen, press Ctrl+Enter and see the result in Chrome Dev Tools JavaScript console. The result includes the output, the return value and the net server execution time., (*24)

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., (*25)

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., (*26)

The Versions

09/05 2018

dev-master

9999999-dev https://github.com/unfulvio/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2.0+

The Requires

 

The Development Requires

wordpress debug development console command-line terminal cli debugging php-console

19/02 2018

1.5.1

1.5.1.0 https://github.com/unfulvio/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2.0+

The Requires

 

The Development Requires

wordpress debug development console command-line terminal cli debugging php-console

03/06 2016

1.5.0

1.5.0.0 https://github.com/unfulvio/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2.0+

The Requires

 

The Development Requires

wordpress debug development console command-line terminal cli debugging php-console

11/01 2016

1.4.0

1.4.0.0 https://github.com/unfulvio/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2.0+

The Requires

 

The Development Requires

wordpress debug development console command-line terminal cli debugging php-console

09/09 2015

1.3.9

1.3.9.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2.0+

The Requires

 

The Development Requires

wordpress debug development console command-line terminal cli debugging php-console

14/07 2015

1.3.8

1.3.8.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2.0+

The Requires

 

wordpress debug development console command-line terminal cli debugging php-console

09/07 2015

1.3.7

1.3.7.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2.0+

The Requires

 

wordpress debug development debugging php-console

19/06 2015

1.3.5

1.3.5.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

The Requires

 

wordpress debug development debugging php-console

03/03 2015

1.3.2

1.3.2.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

The Requires

 

wordpress debug development debugging php-console

09/02 2015

1.3.1

1.3.1.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

The Requires

 

wordpress debug development debugging php-console

05/02 2015

1.3.0

1.3.0.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

The Requires

 

wordpress debug development debugging php-console

12/12 2014

1.2.1

1.2.1.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

The Requires

 

wordpress debug development debugging php-console

11/12 2014

1.2.0

1.2.0.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

The Requires

 

wordpress debug development debugging php-console

07/11 2014

1.1.0

1.1.0.0 https://github.com/nekojira/wp-php-console

A WordPress implementation of PHP Console.

  Sources   Download

GPLv2 or later

wordpress debug development debugging