# Using Ray with Craft CMS

[Craft CMS](https://craftcms.com/) is a flexible, user-friendly CMS built with PHP on the [Yii framework](/content/docs/php/yii/getting-started/index.html). Use Ray to help you debug when you're developing a Craft CMS website, module or plugin.

[spatie/craft-ray](https://github.com/spatie/craft-ray)

## Installing the package

You can add the Ray package through the [plugin store](https://plugins.craftcms.com/craft-ray), or through Composer.

```
craft plugin/install craft-ray
```

```
composer require spatie/craft-ray
```

This installs Ray as a project dependency, meaning it will also be installed in your production environment. Your application won't break if you forget to remove a `ray` call. The package doesn't send data when the environment isn't set to `dev`.

If you prefer, install it as a dev dependency by adding `--dev` to the composer command. Note that with a dev dependency, any `ray` calls left in your code will cause errors in production, so you'll need to remove them before deploying. We have some options for [detecting Ray calls](/content/docs/php/vanilla-php/detecting-removing-ray-calls/index.html) in your app.

```
composer require spatie/craft-ray --dev
```

## Usage

All [generic PHP methods](/content/docs/php/vanilla-php/usage/index.html) are available when using Craft CMS.

To enable `ray()`, `dd()` and `dump()` globally in any file, see the [global installation instructions](/content/docs/php/vanilla-php/installation#global-installation/index.html).

## What's next?

Now that Ray is installed in your Craft CMS project, see what you can use it for.

- [Learn how to use Ray with PHP](/content/docs/php/vanilla-php/usage/index.html)
- [View all available methods](/content/docs/php/vanilla-php/reference/index.html)

## Debug without breaking your flow

Ray keeps all your debug output neatly organized in a dedicated desktop app.

Download Ray

[Buy Ray for\
434 NOK](https://spatie.be/products/ray)

Licenses are valid for 1 year and managed through [Spatie](https://spatie.be/products/ray). Licenses purchased before Ray 3 remain valid. VAT is calculated at checkout.

## Thanks for trying out Ray!

macOS

[ARM](https://spatie.be/products/ray/v3/download/macos-arm64/latest) [Intel](https://spatie.be/products/ray/v3/download/macos-x64/latest)

Windows

[x86 (Intel)](https://spatie.be/products/ray/v3/download/windows/latest)

Linux

[AppImage](https://spatie.be/products/ray/v3/download/linux/latest)
