WP Console – WordPress PHP Console powered by PsySH

Descrizione

WP Console brings the famous PsySH on your browser. PsySH is a runtime developer console, interactive debugger and REPL for PHP.

Write your code in code editor, press Cmd-Enter(mac) or Ctrl-Enter(win/linux) and get your output in your browser.

You can also use PsySH with wp-cli with the command wp shell. wp-cli has built-in support for psysh already. You need to just activate WP Console to use this.

WP Console requires WordPress v5.0 or later.

Features

  • Powerful code editor powered by Ace Editor.
  • PHP core and WordPress functions live autocompletion with placeholders.
  • _dump as the alternative to var_dump which uses Symfony VarDumper.
  • Get debug.log contents and clear them right from your browser.
  • Advanced shell powered by psySH for wp shell.
  • Custom code snippet. Supports VS Code supported code snippets. For example you can use this WooCommerce snippets.

Please note that, currently PsySH commands like ls, doc, show etc and Magic variables like $_, $__class etc are not supported in browser console.

👉 WP Console uses Gutenberg packages and components for its UI/UX. Checkout the GitHub repo here ediamin/wp-console.

Security Concern

WP Console explicitly checks for manage_options permission to display the UI and perform other actions. Yet, this plugin should not be used in production server.

Screenshot

  • Basic input output
  • _dump command
  • Vertical splitted window
  • Live Autocompletion
  • Autocompletion with placeholder
  • Display errors
  • wp shell command
  • Get debug.log contents
  • Clear debug.log
  • Add/Edit custom snippets
  • Custom snippets in action

Recensioni

26 Novembre 2021
Super useful for testing functionality and inspecting WordPress data.
21 Aprile 2021
Very useful tool, thank's a lot! Many things easier to do with code, with no plugins and that is perfect tool for this. Very good!
15 Gennaio 2021
php artisan tink... Wait, it's a WordPress project. :/ WP Console aka wp shell to the rescue! Love it!
Leggi tutte le recensioni di 10

Contributi e sviluppo

“WP Console – WordPress PHP Console powered by PsySH” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

Traduci “WP Console – WordPress PHP Console powered by PsySH” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il Codice segui il Repository SVN iscriviti al Log delle Modifiche. Puoi farlo tramite RSS con un lettore di feed.

Changelog (registro delle modifiche)

2.2.0 – November 22, 2020
* Add custom code snippet support. You can use VS Code supported PHP code snippets now.
* Add Copy Output button.
* Enqueue scripts only for manage_options capability owners.
* Improve handling uncaught fatal errors.
* Add Twenty Twenty theme compatibility.
* Set default values for user Console settings in REST API.
* Fix horizontal output scolling issue for vertically split console.
* Fix close button get disappear in WooCommerce admin pages.
* Fix error line no in console editor

2.1.0 – April 14, 2020
* Lazy load React components to improve performance
* Use a single store source for all components
* Reset console responses after close app window
* Fix navigation button icon css for WP v5.4
* Resize editor screen after toggle split mode

2.0.0 – December 11, 2019
* Revamp UI/UX.
* Add Ace editor as code editor plugin. Remove CodeMirror.
* Live autocompletion with placeholders.
* Option to vertically split editor and output window.
* Add ability to clear debug.log.
* Restrict plugin UI and REST APIs for users who have manage_options capability.

1.5.0 – November 07, 2019
* Tweak – Change dump function name to _dump to resolve conflict with wp-erp

1.4.0 – November 02, 2019
* New – Save code editor history in localStorage
* Tweak – Use wp-scripts for assets build process

1.3.0 – October 26, 2019
* New – Fetch debug.log contents
* Tweak – Support PHP version 5.6

1.2.0 – July 27, 2019
* New – Add autocompletion data(WP functions, PHP booleans, constants, functions, keywords)
* New – Add codemirror closebrackets, matchbrackets addon scripts
* New – Show error stacktrace

1.1.0 – June 25, 2019
* New – Use output buffer handler
* New – Add build process
* Tweak – Remove unnecessary code

1.0.0 – June 21, 2019
Initial release