# 🎉 Introduction

XR Debug is a dump debug utility for PHP. It uses a ReactPHP (opens new window) SSE (opens new window) server to provide a web-based debug application server that you can access in any web browser.

Here's, this is what you write in your PHP code:

xr('Hello, world!');

xr(theArray: ['a' => 0, 'b' => 1], t: 'my-topic', e: '📌');

xr(🤭: 'wow', 👽: 'many', 😎: 'args');

Here's how it looks in XR Debug debugger:

intro

There are other helper functions that allow you to show system information, pause your code, etc. You can easily build your own dump functions tailored for your specific application context.

# How it works?

  • An HTTP web server is in charge of listening to messages emitted from your code.
  • You can configure the server where your code stream messages to.
  • Calls to xr() helpers in your code emit a message to the configured XR Debug server.

XR Debug generates a beautiful variable introspection on site using VarDump (opens new window), then these HTML messages are streamed in the web interface of your XR Debug server.

# Does it work with X?

XR Debug works in any PHP 8.0+ codebase.

You can use it in your framework, CMS or custom application. You are encouraged to contribute with vendor-specific support to make XR Debug more context-aware.