2017 © Pedro Peláez
 

library shellout

A tool to output debugging information to shell

image

shellout/shellout

A tool to output debugging information to shell

  • Sunday, November 3, 2013
  • by wkjagt
  • Repository
  • 2 Watchers
  • 10 Stars
  • 1,090 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

ShellOut

Something I've found really annoying for a long time when debugging PHP code, is that print_r outputs to standard out and, in the case of web development, becomes part of your response. In simple projects this works fine. But if you're using a lot of ajax requests, that, for example, return json, using print_r becomes really annoying, because you need to dig around your browser's dev console to inspect the response, your frontend code will break because your print_r or var_dump will make your json invalid, and sometimes your printed information is not visible at all because of very mysterious reasons., (*1)

Keep the response clean

Something I really wanted, is to output debugging information to the terminal (not your browser terminal, but your Mac or Linux terminal) and keep my responses clean. And that is exactly what this tool does., (*2)

It's as simple as:, (*3)

  1. start the "server" (which is nothig more than a listening socket that outputs what it receives). This is where your debug information will show.
vendor/bin/shellout shellout:listen
  1. In your code, output for example $_SERVER
Shell::out($_SERVER);
  1. And you'll get this in your terminal:
  2. image

Installation

This is a composer package, so installation is as easy as adding the following to your require-dev:, (*4)

{
  "require-dev" : {
    "shellout/shellout": "@dev"
  }
}

The Versions

03/11 2013

dev-master

9999999-dev

A tool to output debugging information to shell

  Sources   Download

The Requires

 

console terminal shell debugging socket print_r vardump