pedrotroller / trace-debug
A little debugging tool. You can capture stack traces.
Installs: 14 051
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- symfony/dependency-injection: ~2.0
- symfony/http-kernel: ~2.0
Requires (Dev)
- phpspec/phpspec: ~2.1
Suggests
- pedrotroller/dredd-report: A quick report of your security voters atcivity.
This package is auto-updated.
Last update: 2024-12-19 02:38:08 UTC
README
#TRACE DEBUG
##What is it ?
A simple library and a Symfony bundle. With it, you will be able to captule stacktraces and display them into the debug toolbar.
##Installation (Symfony Bundle)
class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { // ... $bundles[] = new PedroTroller\TraceDebug\Bundle\TraceDebugBundle(); } return $bundles; } }
##Usage
This library will add a new function : trace()
. You just have to call this function and a stacktrace will be captured.
class SomeClass { public function someFunction() { // ... trace(); // ... } }
And thats all, now, you will see a new button into the toolbar named Trace()
with the number on stacktrace captured.
##Capture multiple stacktrace from multiple places
If you want to capture stacktrace from differents places, it will be dificult to know which trace come from which place... So, you just have to give a name to the capture.
class SomeClass { public function someFunction() { // ... trace('capture1'); // ... } public function someOtherFunction() { // ... trace('capture2'); // ... } }
And so, the display will sort traces from the name of the capture.