Download the PHP package nklatt/debugout without Composer

On this page you can find all versions of the php package nklatt/debugout. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package debugout

DebugOut

DebugOut for PHP, for tracing code execution the old-fashioned way: with printlines.

History

I initially created this pair of classes, DebugOut and DynamicDebug, in the mid-nineties for C++. It was later ported to Ada 95 and now PHP; I did not port it to Java because the DebugOut class relies on its destructor being called immediately upon its instantiations go out of scope and that doesn't happen with Java's garbage collection. (The C++ and Ada versions were both thread-aware; as I've not had occasion to use threads in PHP, this version does not include that capability.)

Purpose

What they do is allow you to instrument code so that you can trace the execution path to the level of detail you would like by configuring what paths you're interested in for any given run through. DebugOut handles the outputting and DynamicDebug controls which scopes are traced based on a configuration file which is read in at the beginning of every, e.g., page load.

Installation

Use [Composer] to install the package:

Usage

There are two steps to using this package.

First, you need to instrument your code with DebugOut instantiations in the functions/methods you wish to trace/debug. At the top of such functions, add $debugOut = new DebugOut(__FUNCTION__, '<flag>'); then, in the body, add calls to $debugOut->putLine passing it a string to be output.

Second, you need to enable logging for the flags you wish to see for any given run. This is done by calling DynamicDebug::setEnabledFlags(array(<list of flags to enable>));.

See tests/DebugOutTest.php for sample code.

Sample Output

Default

Piped

Brief

Standards Followed

This project follows PSRs 1, 2, and 4. It is also set up to be used with Composer via Packagist. It has some basic automated testing utilizing PHPUnit.

Shortcomings / Future Plans

This does not follow PSR-3, though I expect it should, or at least could. It's also possible it could be a Monolog extension.

Perhaps most egregiously, it currently logs output using error_log calls and that seems just wrong. Not sure what the best solution to this is - perhaps refactoring to be a Monolog extension would take care of that, too.


All versions of debugout with dependencies

PHP Build Version
Package Version
Requires php Version ^5.3 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nklatt/debugout contains the following files

Loading the files please wait ...