Code Monkey home page Code Monkey logo

bug-spray's Introduction

Bug Spray

Contributors: @sewmyheadon
Tags: development, tools, dev tools Requires at least: 4.5
Tested up to: 5.0.2
Stable tag: 1.0.5 License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Description

Bug Spray is a WordPress plugin that contains a small suite of developer tools to make WordPress development and debugging easier and more fun.

This plugin includes:

  1. Composer - Manage PHP dependencies.
  2. Kint - Helpful replacement for var_dump(), print_r() and debug_backtrace().
  3. Whoops - Replaces default PHP orange error table with information you can actually use.
  4. Grunt - Used only if you wish to help develop this plugin further. Grunt is used for i18n and readme.txt to readme.md conversion.

Installation

Composer must already be installed on your system.

  1. Clone this project into a directory within wp-content/plugins/.
  2. Use Terminal to cd into the plugin directory and run composer install. This will load this plugin's dependencies.
  3. If you are developing Bug Spray rather than using it for development, run npm install from the plugin directory.
  4. Log into your WordPress site
  5. Activate the plugin.

Once you have installed and activated Bug Spray, your WordPress Admin bar will turn orange.

Bug Spray Admin Bar

Usage

Kint

Kint is debugging tool for PHP developers.

Kint is (not) just a pretty replacement for var_dump(), print_r() and debug_backtrace()

Once activated you can use the following functions to help troubleshoot code:

  • d() - Dumps data
  • ddd() - Dumps data and dies

Just wrap these functions around a variable and you'll get a nicer visual presentation of the variable data.

Kint

Whoops

When your PHP code has an error, Whoops will whip the error codes into a more helpful, readable format to make debugging easier.

Whoops

Sandbox

There's also a sandbox.php file in the src directory that you can use to try out code.

Where to get help

Contribution Guidelines

Feel free to contribute pull requests.

Contributor List

Credits, Inspiration, Alternatives

This plugin is inspired by Tonya Mork of KnowTheCode, who has a great tutorial on building this plugin on KnowTheCode.io.

License

GPL v2 license. See LICENSE for full details.

Code Quality

Scrutinizer Code Quality

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.