https://github.com/pmvc-plugin/dev
PMVC for develop information
https://github.com/pmvc-plugin/dev
pmvc-debug
Last synced: about 1 month ago
JSON representation
PMVC for develop information
- Host: GitHub
- URL: https://github.com/pmvc-plugin/dev
- Owner: pmvc-plugin
- Created: 2016-07-15T13:47:05.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T16:36:29.000Z (over 3 years ago)
- Last Synced: 2025-08-30T08:30:47.475Z (10 months ago)
- Topics: pmvc-debug
- Language: PHP
- Homepage:
- Size: 59.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://packagist.org/packages/pmvc-plugin/dev)
[](https://packagist.org/packages/pmvc-plugin/dev)
[](https://circleci.com/gh/pmvc-plugin/dev/tree/main)
[](https://packagist.org/packages/pmvc-plugin/dev)
[](https://packagist.org/packages/pmvc-plugin/dev)
dev
===============
## How to set debug level
* https://github.com/pmvc-plugin/debug#how-to-trigger-debug
## Best plug order
* put dev before debug, you could get most of plug trace
```
\PMVC\Load::plug([
'controller'=>null
,'dispatcher'=>null
/*dev*/
,'error'=>['all']
,'dev'=>null
,'debug'=>null
]);
```
## Unit test tip
```
\PMVC\plug('debug',[
'output'=> '*Output Plugin*'
])->setLevel('*Test Level*', true);
\PMVC\plug('dev')->onResetDebugLevel();
```
### phpunit
* https://github.com/pmvc-plugin/dev/blob/main/tests/DevWithPhpUnitTest.php
### debug with cli
```php
\PMVC\plug('dev')->debug_with_cli();
```
* display debug only (without trace)
```php
\PMVC\plug('dev')->debug_with_cli('debug');
```
* accept multiple dump level
```php
\PMVC\plug('dev')->debug_with_cli('debug, trace, help');
```
## Why help also trigger dump
* https://github.com/pmvc-plugin/dev/blob/main/dev.php#L45
## Install with Composer
CLICK TO SEE
### 1. Download composer
* mkdir test_folder
* curl -sS https://getcomposer.org/installer | php
### 2. Install by composer.json or use command-line directly
#### 2.1 Install by composer.json
* vim composer.json
```
{
"require": {
"pmvc-plugin/dev": "dev-master"
}
}
```
* php composer.phar install
#### 2.2 Or use composer command-line
* php composer.phar require pmvc-plugin/dev
or
* composer require pmvc-plugin/dev