PHPackages                             xrdebug/laravel - 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. xrdebug/laravel

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

xrdebug/laravel
===============

Laravel client for xrDebug

1.0.0(2mo ago)40Apache-2.0PHPPHP ^8.2CI passing

Since May 25Pushed 1mo agoCompare

[ Source](https://github.com/xrdebug/laravel)[ Packagist](https://packagist.org/packages/xrdebug/laravel)[ Docs](https://xrdebug.com)[ RSS](/packages/xrdebug-laravel/feed)WikiDiscussions 1.0 Synced 1w ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

xrDebug Laravel client
======================

[](#xrdebug-laravel-client)

[![xrDebug](xr.svg)](https://xrdebug.com)

[![Build](https://camo.githubusercontent.com/54e2ef1617485b00f49017ec619f33449009675c4b5097aced6cbf2f66d556b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f787264656275672f6c61726176656c2f746573742e796d6c3f6272616e63683d312e30267374796c653d666c61742d737175617265)](https://github.com/xrdebug/laravel/actions)[![Code size](https://camo.githubusercontent.com/9e3f3f26598dae00e9310a3f5b66eb60fc0c039afe07cc82a72b37eefa69d552/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f787264656275672f6c61726176656c3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/9e3f3f26598dae00e9310a3f5b66eb60fc0c039afe07cc82a72b37eefa69d552/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f787264656275672f6c61726176656c3f7374796c653d666c61742d737175617265)[![Apache-2.0](https://camo.githubusercontent.com/94f2ba1ea08336ea2227cf89e9652d3d3b47db77ff70dcdd52a2d0eb11ea46d4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f787264656275672f6c61726176656c3f7374796c653d666c61742d737175617265)](LICENSE)[![PHPStan](https://camo.githubusercontent.com/6016298b28550819030c76e9327f62501596a31fd76406695bae2f3d2a1f26a4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d626c756576696f6c65743f7374796c653d666c61742d737175617265)](https://phpstan.org/)[![Mutation testing badge](https://camo.githubusercontent.com/6f03e07136c7cbd562c9d787c7d2fc815f7c89df7fe3e37be706bd20ab1472e4/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d253246787264656275672532466c61726176656c253246312e30)](https://dashboard.stryker-mutator.io/reports/github.com/xrdebug/laravel/1.0)

[![Quality Gate Status](https://camo.githubusercontent.com/11feb1f19fd8784074e51b6aba48a6be5b5a88d4431f3ec6c4729c06707d4302/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d787264656275675f6c61726176656c266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=xrdebug_laravel)[![Maintainability Rating](https://camo.githubusercontent.com/342a82be9613627a4b933c67598e10632ab0212da34123035269a8062f6287e5/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d787264656275675f6c61726176656c266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/dashboard?id=xrdebug_laravel)[![Reliability Rating](https://camo.githubusercontent.com/8fe36f859a6dcdb4481221205bfc36f9dda7700b26084ac6bca9bb36c7020779/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d787264656275675f6c61726176656c266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=xrdebug_laravel)[![Security Rating](https://camo.githubusercontent.com/695b5f6d596371fb1611ce80feea84a1ce6c2acb10a30ca6591ccaf225d2e0cf/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d787264656275675f6c61726176656c266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=xrdebug_laravel)[![Coverage](https://camo.githubusercontent.com/4f374d1a4d08d0d92d574e3befc36793d2b45177e0058a94218e8e6b6ac67d9d/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d787264656275675f6c61726176656c266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=xrdebug_laravel)[![Technical Debt](https://camo.githubusercontent.com/bfed87b3bd15367d56711005417a16be6c3cc95973b79ed98ef36998327d1fae/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d787264656275675f6c61726176656c266d65747269633d7371616c655f696e646578)](https://sonarcloud.io/dashboard?id=xrdebug_laravel)

Summary
-------

[](#summary)

Laravel client library for [xrDebug](https://xrdebug.com/). This library provides a set of functions to dump variables, send raw messages, and interact with the inspector.

Quickstart
----------

[](#quickstart)

Install using [Composer](https://packagist.org/packages/xrdebug/laravel).

```
composer require --dev xrdebug/laravel
```

(Optional) Publishing the config file:

```
php artisan xr:publish-config
```

This creates `xr.php` at the project root so you can configure host, port, and watcher toggles. Add `--docker` or `--homestead` flags to set the default host for those environments:

```
php artisan xr:publish-config --docker
php artisan xr:publish-config --homestead
```

Use xrDebug helpers anywhere in your Laravel code:

```
xr('Hello from Laravel');
xr(userId: auth()->id(), t: 'Auth');
```

Laravel package auto-discovery registers the service provider automatically.

Configuration
-------------

[](#configuration)

Configuration can be defined in `xr.php` at project root and in `config/xr.php`. If both files exist, `config/xr.php` takes precedence.

```
