{"id":15061426,"url":"https://github.com/smithsonian/drupal-ray-debugger","last_synced_at":"2025-10-04T21:31:17.114Z","repository":{"id":41586218,"uuid":"486599438","full_name":"Smithsonian/Drupal-Ray-Debugger","owner":"Smithsonian","description":"Drupal module for integrating the Ray debug tool.","archived":true,"fork":false,"pushed_at":"2022-05-02T14:24:00.000Z","size":36,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-09-29T07:04:30.584Z","etag":null,"topics":["drupal"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smithsonian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-28T13:10:38.000Z","updated_at":"2023-01-28T01:10:10.000Z","dependencies_parsed_at":"2022-08-10T03:13:15.025Z","dependency_job_id":null,"html_url":"https://github.com/Smithsonian/Drupal-Ray-Debugger","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2FDrupal-Ray-Debugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2FDrupal-Ray-Debugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2FDrupal-Ray-Debugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2FDrupal-Ray-Debugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smithsonian","download_url":"https://codeload.github.com/Smithsonian/Drupal-Ray-Debugger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219876761,"owners_count":16554786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drupal"],"created_at":"2024-09-24T23:19:28.545Z","updated_at":"2025-10-04T21:31:11.832Z","avatar_url":"https://github.com/Smithsonian.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drupal Ray Debugger\n\n❗This module has been moved to drupal.org: https://www.drupal.org/project/ray_debugger/\n\nA simple Drupal module for integrating the [Ray Debugging tool](https://myray.app/) for use within a Drupal project.\nRay allows developers to debug code in PHP, Twig, Javascript, and [integrates](https://spatie.be/docs/ray/v1/installation-in-your-project/introduction)\nwith numerous PHP/JS frameworks and content management systems.\n\n\n## Install\n\nThis module requires installation with [composer](https://getcomposer.org/).\n\n```\ncomposer install smithsonian/ray_debugger\n```\n\n:bulb: It's common to include a development module like this using `--require-dev` in composer, or adding the module\nto Drupal's `$settings['config_exclude_modules']` setting so the module won't be installed on other environments. Keep\nin mind that leftover debug statements in the codebase might result in a fatal error without the module and dependencies\ninstalled\n\n## Requirements\n\n- drupal/core 8.8 or greater\n- PHP 7.3 or greater\n\n## Modules\n\n### Ray Debugger\n\nThe base module for common libraries.\n\nExample usage in mytheme.theme file:\n```php\nfunction mytheme_preprocess_html(\u0026$variables) {\n  ray($variables)-\u003epurple()-\u003elabel('HTML variables');\n}\n```\n\n### Ray Debugger Twig\n\nA module that allows you to debug Twig variables using Ray in theme/module Twig files.\n\nExample usage in node.html.twig:\n```twig\n  {{ ray(view_mode, 'label', 'The current View Mode' ) }}\n```\n\n### Ray Debugger Javascript\n\nA module that allows you to debug Javascript variables using Ray in theme/module JS files.\n\nExample usage in a custom module javascript library:\n```js\nDrupal.behaviors.myModule = {\n  attach: function (context, settings) {\n    ray(settings);\n  }\n};\n```\n\n### Ray Debugger AlpineJS\n\nA module that allows you to debug [alpine.js](https://alpinejs.dev/start-here) using Ray.\n\nExample usage in a Twig template:\n```twig\n\u003cbutton x-on:click=\"$ray(message)\" x-data=\"{ message: 'I ❤️ Debugging Alpine' }\"\u003eClick me!\u003c/button\u003e\n```\n\n## Setting up Ray\n\nSetup requires adding a [ray.php](https://spatie.be/docs/ray/v1/configuration/framework-agnostic-php) config file to\nyour project root.\n\n### Lando\n\nIf using [Lando](https://lando.dev/) as a development environment for your Drupal project, you'll want to follow the [docker configuration docs\nfor Ray](https://spatie.be/docs/ray/v1/environment-specific-configuration/docker), setting up the `ray.php`\n[config](https://spatie.be/docs/ray/v1/configuration/framework-agnostic-php) file specific to your `.lando` file\nand adding `127.0.0.1 host.docker.internal` to your`/etc/hosts` file.\n\nAn example .lando.yml (using the Drupal 9 recipe):\n\n```yaml\nname: example-drupal-project\nrecipe: drupal9\nconfig:\n  webroot: web\n  composer_version: '2.2.12'\n  php: '8.1'\n  via: nginx\n  database: mysql:8.0\n  xdebug: false\nservices:\n  appserver:\n    overrides:\n      extra_hosts:\n        - \"host.docker.internal:host-gateway\" # adding \"127.0.0.1 host.docker.internal\" to /etc/hosts\n\n```\nand the corresponding `ray.php` at the project root:\n\n```php\n\u003c?php\n\nreturn [\n  /*\n  * This settings controls whether data should be sent to Ray.\n  */\n  'enable' =\u003e true,\n  /*\n   *  The host used to communicate with the Ray app.\n   */\n  'host' =\u003e 'host.docker.internal',\n  /*\n   *  The port number used to communicate with the Ray app.\n   */\n  'port' =\u003e 23517,\n  /*\n   *  Absolute base path for your sites or projects in Homestead, Vagrant, Docker, or another remote development server.\n   */\n  'remote_path' =\u003e '/app/web',\n  /*\n   *  Absolute base path for your sites or projects on your local computer where your IDE or code editor is running on.\n   */\n  'local_path' =\u003e '/home/username/example-drupal-project/web',\n  /*\n   * When this setting is enabled, the package will not try to format values sent to Ray.\n   */\n  'always_send_raw_values' =\u003e false,\n];\n```\n\n### DDEV\n\nTODO: Document setup with [ddev](https://github.com/drud/ddev/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmithsonian%2Fdrupal-ray-debugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmithsonian%2Fdrupal-ray-debugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmithsonian%2Fdrupal-ray-debugger/lists"}