XR
🔔 Subscribe to the newsletter to don't miss any update regarding Chevere.
XR is a dump server utility built on top of ReactPHP.
Features
-
✨ Dump single or multiple arguments -
😊 One-click server run on top of PHP (no extras required) -
👻 Filter messages by Topics and/or Emotes -
📟 Dump backtrace (if you need it) -
⏸ Pause your code execution (*not implemented yet) -
🌚 Dark /🌝 Light mode follows your system preferences -
👽 Ephemeral as it doesn't require to store any persistent data -
🤓 Multi-client as it broadcast dump messages to all connected clients -
🍒 It's HTML based, save your session for offline usage
Status
This project is under preview status.
Getting started
🚧 Min stability dev
- Add
chevere/xr
as a dev dependency in your project:
composer require --dev chevere/xr
Start the server
- With PHP:
php vendor/chevere/xr/server.php 27420
- With Docker:
docker run -d -p 27420:27420 \
--name chevere-xr \
ghcr.io/chevere/xr:main
The server will be available at http://localhost:27420
Demo
Open the debugger and then run:
- With PHP:
php demo/showtime.php
- With Docker:
docker exec -it \
chevere-xr \
php demo/showtime.php
XR Helpers
Dump variables
Use xr($var1, $var2,...)
to dump any variable from your code.
xr($var, 'Hola, mundo!');
Topic
Add a topic passing t:
.
xr($var, 'Hola, mundo!', t: 'Epic win');
Emote
Add an emote passing e:
.
xr($var, 'Hola, mundo!', t: 'Epic win', e: '😎');
Flags
Pass bitwise flags to trigger special behavior.
f: XR_BACKTRACE
to dump debug backtrace.
xr($var, 'Hola, mundo!', t: 'Epic win', e: '😎', f: XR_BACKTRACE);
f: XR_PAUSE
to pause code execution (*not implemented).
xr($var, 'Hola, mundo!', t: 'Epic win', e: '😎', f: XR_PAUSE);
Message reference
POST http://localhost:27420/message
body=Hola, mundo
file_path=/var/www/file.php
file_line=123
...
body
- The message raw body (HTML).file_path
- The file path.file_line
- The file line.emote
- emote (emojis/symbols)topic
- Topic as message context.
Docker
Start/Stop
docker container start chevere-xr
docker container stop chevere-xr
Remove
docker container rm chevere-xr -f
Build
docker build -t ghcr.io/chevere/xr:tag . \
-f xr.Dockerfile