Skip to content

Commit e1c9d74

Browse files
committed
Update README.md to enhance structure and add metrics section
1 parent 006ca24 commit e1c9d74

1 file changed

Lines changed: 42 additions & 12 deletions

File tree

README.md

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# DebugPHP
1+
<div align="center">
2+
3+
<img src="https://github.com/CallMeLeon167/debugphp-art/blob/main/DebugPHP_logo.png?raw=true" alt="DebugPHP" width="400">
24

35
**Real-time PHP debugging in the browser.**
46

@@ -8,6 +10,8 @@ DebugPHP streams your debug output to a browser-based dashboard via Server-Sent
810
[![PHP Version](https://img.shields.io/badge/PHP-^8.1-777BB4.svg)](https://php.net)
911
[![PHPStan](https://img.shields.io/badge/PHPStan-Level%2010-brightgreen.svg)](https://phpstan.org)
1012

13+
</div>
14+
1115
---
1216

1317
## Why DebugPHP?
@@ -21,6 +25,8 @@ DebugPHP streams your debug output to a browser-based dashboard via Server-Sent
2125
| Free & open source ||| ❌ ($49/yr) ||
2226
| No dependencies |||||
2327

28+
---
29+
2430
## Installation
2531

2632
```bash
@@ -29,6 +35,8 @@ composer require callmeleon167/debugphp --dev
2935

3036
> **Requirements:** PHP 8.1+ and the `curl` extension.
3137
38+
---
39+
3240
## Quick Start
3341

3442
```php
@@ -45,6 +53,8 @@ Debug::send($request->all());
4553

4654
Open the [Dashboard](https://debugphp.dev/dashboard) in your browser — your debug data appears in real-time.
4755

56+
---
57+
4858
## Usage
4959

5060
### Send Data
@@ -94,6 +104,15 @@ Debug::table([
94104
]);
95105
```
96106

107+
### Metrics
108+
109+
```php
110+
// Displayed as live chips in the dashboard toolbar
111+
Debug::metric('Memory', memory_get_usage(true) / 1024 / 1024 . ' MB');
112+
Debug::metric('Template', 'home.php');
113+
Debug::metric('Maintenance'); // Label only, no value
114+
```
115+
97116
### Clear & Pause
98117

99118
```php
@@ -107,6 +126,8 @@ Debug::pause();
107126
Debug::resume();
108127
```
109128

129+
---
130+
110131
## Configuration
111132

112133
```php
@@ -131,9 +152,11 @@ Debug::init('your-session-token', [
131152
]);
132153
```
133154

155+
---
156+
134157
## Self-Hosted
135158

136-
Want to keep your debug data on your own server?
159+
Want to keep your debug data on your own server? Use the [DebugPHP Server](https://github.com/CallMeLeon167/debugphp-server):
137160

138161
```bash
139162
git clone https://github.com/CallMeLeon167/debugphp-server.git
@@ -150,13 +173,7 @@ Debug::init('your-session-token', [
150173
]);
151174
```
152175

153-
## Static Analysis
154-
155-
DebugPHP is fully analyzed with [PHPStan](https://phpstan.org) at **level 10** (the strictest level).
156-
157-
```bash
158-
./vendor/bin/phpstan analyse
159-
```
176+
---
160177

161178
## How It Works
162179

@@ -171,13 +188,26 @@ DebugPHP is fully analyzed with [PHPStan](https://phpstan.org) at **level 10** (
171188
└──────────────┘ └──────────────┘ └──────────────┘
172189
```
173190

191+
---
192+
193+
## Static Analysis
194+
195+
DebugPHP is fully analyzed with [PHPStan](https://phpstan.org) at **level 10** (the strictest level).
196+
197+
```bash
198+
./vendor/bin/phpstan analyse
199+
```
200+
201+
---
202+
174203
## License
175204

176205
MIT — see [LICENSE](LICENSE) for details.
177206

207+
---
208+
178209
## Links
179210

180211
- **Website:** [debugphp.dev](https://debugphp.dev)
181-
- **Documentation:** [debugphp.dev/docs](https://debugphp.dev/docs)
182-
- **Dashboard:** [debugphp.dev/dashboard](https://debugphp.dev/dashboard)
183-
- **GitHub:** [github.com/CallMeLeon167/debugphp](https://github.com/CallMeLeon167/debugphp)
212+
- **Server:** [github.com/CallMeLeon167/debugphp-server](https://github.com/CallMeLeon167/debugphp-server)
213+
- **Dashboard:** [debugphp.dev/dashboard](https://debugphp.dev/dashboard)

0 commit comments

Comments
 (0)