sunnysideup / vardump
Dev Module for intelligent Debugging
Package info
github.com/sunnysideup/silverstripe-vardump
Type:silverstripe-vendormodule
pkg:composer/sunnysideup/vardump
Requires
- silverstripe/recipe-core: ^6.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
TL;DR
For classes that extend Viewable Data you can do this:
use Sunnysideup\Vardump\Vardump; class MyClass extends WhateverWithViewableDataAsOneParentClass { public function VardumpMe(string $method) { return Vardump::inst()->vardumpMe($this->{$method}(), $method, static::class); } }
If you have a class that does not extend Viewable data then you can do this:
use Sunnysideup\Vardump\Vardump; use Sunnysideup\Vardump\DebugTrait; class MyClass { use DebugTrait; //..... }
In the template you can then use:
$VardumpMe(VariableOrMethod)
Requirements
See composer.json for details
Suggested Modules
See composer.json for details
Installation
composer require sunnysideup/vardump
Configuration
In the _config folder you will find the vardump.yml.example
file that shows options for the configuration of this module.
We recommend that you:
- copy these
vardump.yml.examplefiles into yourapp/_configfolder (where available - otherwise search forprivate static $in the module to see what can be configured) - remove the .example extension,
- delete the lines you do not care about, and
- adjust the configurations that you would like to use.
Contributing
We welcome any contributions. See CONTRIBUTING.md for more details.
Paid assistance
You can pay us to create an improved / adapted version of this module for your own projects. Please contact us if you like to find out more: www.sunnysideup.co.nz. For exmaple, we can write tests for this module.
Author
Sunny Side Up Ltd.
Care to see more modules?
To find other modules, please visit ssmods.com.