PHPackages                             chevere/xr-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. chevere/xr-server

Abandoned → [chevere/xrdebug](/?search=chevere%2Fxrdebug)Library[Debugging &amp; Profiling](/categories/debugging)

chevere/xr-server
=================

Lightweight debug utility

2.0.3(1y ago)1042.9k2[5 issues](https://github.com/xrdebug/xrdebug/issues)1Apache-2.0GoPHP ^8.1CI passing

Since Jun 19Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/xrdebug/xrdebug)[ Packagist](https://packagist.org/packages/chevere/xr-server)[ Docs](https://docs.xrdebug.com)[ RSS](/packages/chevere-xr-server/feed)WikiDiscussions 3.0 Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (26)Used By (1)

xrDebug
=======

[](#xrdebug)

[xrDebug](https://xrdebug.com/) is a lightweight ultra-fast Open Source debug software alternative to Ray. It allows developers to send debug messages from their applications to a web interface in real-time, enabling collaborative debugging sessions with features like message filtering, pause/resume controls, and end-to-end encryption.

[Play video](https://xrdebug.com/xrdebug.mp4)

[![Get it on macOS](assets/badge/macos.png)![Get it on Linux](assets/badge/linux.png)![Get it on Windows](assets/badge/windows.png)![Get it on FreeBSD](assets/badge/freebsd.png)](https://github.com/xrdebug/xrdebug/releases/latest)

[![xrDebug](.github/banner/xrdebug-social.png)](https://xrdebug.com)

[![Build](https://camo.githubusercontent.com/1dbb124d120c8d0cb38dd3fcf50c814b7129137acde773f73eba97b5e694682a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f787264656275672f787264656275672f746573742e796d6c3f6272616e63683d332e30267374796c653d666c61742d737175617265)](https://github.com/xrdebug/xrdebug/actions)[![Code size](https://camo.githubusercontent.com/4b20f3948235a3277533110bf5c8af20611b3c96274033bb6813ce8d2f8f7a73/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f787264656275672f787264656275673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/4b20f3948235a3277533110bf5c8af20611b3c96274033bb6813ce8d2f8f7a73/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f787264656275672f787264656275673f7374796c653d666c61742d737175617265)[![Apache-2.0](https://camo.githubusercontent.com/1b688ef237b28ebd703d4a9e9ad111d99f87c2933f165f12cde29f58bdd210eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f787264656275672f787264656275673f7374796c653d666c61742d737175617265)](LICENSE)

Installation
------------

[](#installation)

xrDebug is available for Windows, macOS, Linux and FreeBSD. Download the latest xrdebug binary from the [releases page](https://github.com/xrdebug/xrdebug/releases/latest).

### Pre-built binaries

[](#pre-built-binaries)

1. Go to the [releases page](https://github.com/xrdebug/xrdebug/releases/latest).
2. Download the appropriate binary for your operating system.
3. Extract the downloaded file.
4. Move the binary to a directory included in your `PATH`.

Optionally, you can run this command to install the latest version:

```
bash |Debug Messages| B[xrDebug Server]
    B -->|SSE| C[Web Browser]
    B -->|Console Output| D[Terminal]

    subgraph Server Components
        B --> E[SSE Controller]
        B --> F[Message Handler]
        B --> G[Security Layer]
    end

    G -->|Optional| H[TLS Encryption]
    G -->|Optional| I[Message Encryption]
    G -->|Optional| J[Signature Verification]
```

      Loading ### Core Components

[](#core-components)

The system consists of these main components:

1. **Server**

    - Handles incoming debug messages
    - Manages SSE connections
    - Implements security measures
    - Provides HTTP endpoints
2. **Message Handler**

    - Processes incoming debug data
    - Sanitizes content
    - Manages message queuing
    - Handles message broadcasting
3. **Security Layer**

    - TLS encryption for HTTPS
    - End-to-end message encryption
    - Request signature verification
4. **Client Interface**

    - Real-time updates via SSE
    - Message decryption
    - Interactive debugging tools (pause, resume, stop)
    - Editor integration (jump to file, line)

### Data flow

[](#data-flow)

 ```
sequenceDiagram
    participant C as Client App
    participant S as xrDebug Server
    participant B as Browser/Terminal

    C->>+S: Send Debug Message
    Note over S: Sanitize & Process
    S->>S: Apply Security Measures
    S->>B: Broadcast via SSE
    B->>B: Display Debug Info
```

      Loading HTTP API
--------

[](#http-api)

Learn more about the [HTTP API](https://docs.xrdebug.com/api) at the documentation.

### GET /

[](#get-)

To access the web interface, open a web browser and navigate to the server's root URL. The server will serve the web interface.

```
open http://localhost:27420
```

### POST /messages

[](#post-messages)

Sends a message to the server.

**Parameters:**

All parameters are optional, but at least one is required.

- `body`: The message body.
- `emote`: The message type (default: `info`).
- `file_line`: The line number.
- `file_path`: The file path.
- `id`: The message ID.
- `topic`: The message topic.

**Responses:**

- `200 OK`: Message sent.
- `400 Bad Request`: Invalid request.

```
curl --fail -X POST \
    --data "body=My message" \
    --data "file_path=file" \
    --data "file_line=1" \
    http://localhost:27420/messages
```

### POST /pauses

[](#post-pauses)

Creates a pause lock.

**Parameters:**

- `id`: The ID of the pause lock.

The following parameters are optional:

- `body`: The message body.
- `emote`: The message type (default: `info`).
- `file_line`: The line number.
- `file_path`: The file path.
- `topic`: The message topic

**Responses:**

- `201 Created`: Lock created `Location: /pauses/{id}`.
- `409 Conflict`: Lock already exists.

```
curl --fail -X POST --data "id=123" http://localhost:27420/pauses
```

### GET /pauses/{id}

[](#get-pausesid)

Retrieves the status of an existing pause lock.

**Parameters:**

- `id` (path): The ID of the pause lock.

**Responses:**

- `200 OK`: Returns the pause lock (JSON).
- `404 Not Found`: Lock not found.

```
curl --fail -X GET http://localhost:27420/pauses/123
```

### DELETE /pauses/{id}

[](#delete-pausesid)

Deletes a pause lock.

**Parameters:**

- `id` (path): The ID of the pause lock.

**Responses:**

- `204 No Content`: Lock deleted.
- `404 Not Found`: Lock not found.

```
curl --fail -X DELETE http://localhost:27420/pauses/123
```

### PATCH /pauses/{id}

[](#patch-pausesid)

Updates a pause lock status to `stop: true`.

**Parameters:**

- `id` (path): The ID of the pause lock.

**Responses:**

- `200 OK`: Lock updated, returns the pause lock (JSON).
- `404 Not Found`: Lock not found.

```
curl --fail -X PATCH http://localhost:27420/pauses/123
```

### GET /stream

[](#get-stream)

Establishes a Server-Sent Events (SSE) connection.

**Responses:**

- `200 OK`: Returns the SSE stream.

```
curl --fail -X GET http://localhost:27420/stream
```

Signed requests
---------------

[](#signed-requests)

Request signing using Ed25519 digital signatures to verify message origin authenticity. To use signed requests pass the `-s` flag to the `xrdebug` command. Optionally, you can pass the private key using the `-x` flag.

To sign a request, the client must include the `X-Signature` header on requests made to the xrDebug server. The signature is a base64 encoded string generated by signing the serialized post fields with the private key. If there's no fields sign an empty string.

### Sign workflow

[](#sign-workflow)

To sign a request server expect the following data workflow:

1. Sort the post fields by key
2. Concatenate the key-value pairs
3. Sign the concatenated string
4. Base64 encode the signature at `X-Signature` header

Example in PHP:

```
function serialize(array $data): string
{
    $result = '';
    ksort($data);
    foreach ($data as $key => $value) {
        $result .= $key . $value;
    }

    return $result;
}

$serialized = serialize($data);
$signature = $privateKey->sign($serialized);
$signHeader = base64_encode($signature);
```

Example in Python:

```
def serialize(data: dict) -> str:
    return ''.join(f'{k}{v}' for k, v in sorted(data.items()))

serialized = serialize(data)
signature = private_key.sign(serialized)
signHeader = base64.b64encode(signature).decode()
```

The `X-Signature` header should contain the base64 encoded signature generated by the client.

```
curl --fail -X POST \
    --data "body=My signed message" \
    --data "file_path=file" \
    --data "file_line=1" \
    -H "X-Signature: " \
    http://127.0.0.1:27420/messages
```

End-to-End encryption
---------------------

[](#end-to-end-encryption)

End-to-end encryption (AES-GCM AE) between xrDebug server and the debugger web user interface client. To enable end-to-end encryption pass the `-e` flag. Optionally, you can pass the symmetric key using the `-k` flag.

The SSE stream at `/stream` will be encrypted using the symmetric key. Decryption happens on the client-side (web browser).

Development
-----------

[](#development)

Make sure you have [Go](https://golang.org/dl/) installed.

Clone the repository and run the following command to build and run the server from source:

```
go run .
```

License
-------

[](#license)

Copyright [Rodolfo Berrios A.](https://rodolfoberrios.com/)

xrDebug is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance49

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~48 days

Total

26

Last Release

511d ago

Major Versions

0.8.x-dev → 1.0.02023-10-07

1.1.x-dev → 2.0.02024-06-03

PHP version history (3 changes)0.3.0PHP &gt;=8.0

0.7.0PHP ^8.0

0.8.x-devPHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a87fbbcb1518fe64878bc53dedd9f61b81243cbb21b73c26f5e299d501375984?d=identicon)[rodolfo](/maintainers/rodolfo)

---

Top Contributors

[![rodber](https://avatars.githubusercontent.com/u/20590102?v=4)](https://github.com/rodber "rodber (237 commits)")

---

Tags

debugdebuggerdebugging-tooldumpphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/chevere-xr-server/health.svg)

```
[![Health](https://phpackages.com/badges/chevere-xr-server/health.svg)](https://phpackages.com/packages/chevere-xr-server)
```

###  Alternatives

[xrdebug/php

PHP client library for xrDebug

23920.3k2](/packages/xrdebug-php)[symfony/stopwatch

Provides a way to profile code

2.8k387.2M908](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k28](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[chevere/chevere

High quality library for building modern PHP

9718.9k4](/packages/chevere-chevere)[franzl/whoops-middleware

PSR-15 compatible middleware for Whoops, the pretty error handler

282.0M20](/packages/franzl-whoops-middleware)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
