WordPress plugin that provides handy ajaxified debugger tool for DustPress based themes.
JavaScript PHP CSS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
js
LICENSE
README.md
composer.json
plugin.php

README.md

geniem-github-banner

DustPress Plugin: DustPress Debugger

DustPress Debugger is a WordPress plugin which displays the data loaded by your current DustPress model in a json viewer.

Installation

Composer

Install with composer by running:

$ composer require devgeniem/dustpress-debugger

OR add it into your composer.json:

{
  "require": {
    "devgeniem/dustpress-debugger": "*"
  }
}

Manually

  • Clone the DustPress Debugger repository into you WordPress plugins directory.

Activation

To enable the debugger go to the WordPress dashboard and activate the plugin. After activation users with with the manage_options capability can enable the debugger on the user profile page by checking the DustPress Debugger enabled checkbox.

Usage

The debugger prints out a toggle button on the bottom of your page. Clicking the button opens the debugger overlay view. In the debugger view you can:

  • Open and close data sets recursively by holding down the 'Shift' key while clicking an item.
  • Close the debugger by pressing the 'Esc' key.

Add data with JavaScript

You can manually add data into the debugger by using the extend function of the global debugger object in JavaScript. The first parameter is your data. The second parameter is the key under which your data is added. You can add multiple data sets under the same key.

window.DustPressDebugger.extend('someData', 'my-data-key');

If you are using the DustPress.js plugin, the data loaded via AJAX is automatically added into the debugger view.