{"id":15293298,"url":"https://github.com/vavgustov/debug-extras","last_synced_at":"2025-04-13T13:04:29.020Z","repository":{"id":59152790,"uuid":"99166231","full_name":"vavgustov/debug-extras","owner":"vavgustov","description":"Extras for Rails applications debug","archived":false,"fork":false,"pushed_at":"2019-01-30T00:02:16.000Z","size":54,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T04:08:28.320Z","etag":null,"topics":["gem","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vavgustov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-02T22:29:10.000Z","updated_at":"2021-06-20T23:37:29.000Z","dependencies_parsed_at":"2022-09-13T10:50:29.972Z","dependency_job_id":null,"html_url":"https://github.com/vavgustov/debug-extras","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavgustov%2Fdebug-extras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavgustov%2Fdebug-extras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavgustov%2Fdebug-extras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vavgustov%2Fdebug-extras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vavgustov","download_url":"https://codeload.github.com/vavgustov/debug-extras/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631688,"owners_count":21136556,"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":["gem","ruby"],"created_at":"2024-09-30T16:46:08.115Z","updated_at":"2025-04-13T13:04:28.989Z","avatar_url":"https://github.com/vavgustov.png","language":"Ruby","readme":"# DebugExtras \n[![Build Status](https://travis-ci.org/vavgustov/debug-extras.svg?branch=master)](https://travis-ci.org/vavgustov/debug-extras) \n[![Maintainability](https://api.codeclimate.com/v1/badges/63067512ae858df2a5b3/maintainability)](https://codeclimate.com/github/vavgustov/debug-extras/maintainability) \n[![Test Coverage](https://api.codeclimate.com/v1/badges/63067512ae858df2a5b3/test_coverage)](https://codeclimate.com/github/vavgustov/debug-extras/test_coverage)\n\nHelper methods for Ruby on Rails applications debugging. [Screenshots](https://github.com/vavgustov/debug-extras#usage).\n\n## Table of Contents\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n    - [#dd](#dd)\n    - [#wp](#wp)\n    - [#dump](#dump)\n- [Styling](#styling)\n- [License](#license)\n\n## Features\n* `dd \u003cvariable\u003e` at any `app/` place. Inspired by `dd` function from \n[Laravel](https://laravel.com/).\n\n* `wp \u003cvariable\u003e` at any `app/` place. Inspired by classic PHP 'print' debug. \nIt works for HTML pages and bypass other content types like `application/json`.\n\n* `dump \u003cvariable\u003e` at your views. It's alternative for `debug` method from \n`ActionView::Helpers::DebugHelper` and `ap` from `AwesomePrint`.\n\n## Installation\n\nAdd this line to your Gemfile:\n\n```ruby\ngem 'debug-extras', group: :development\n```\n\nAnd then execute:\n\n    $ bundle\n\n## Usage\n\n### #dd\n\nCall `dd` from any `app/` place:\n\n```ruby\ndd @books\n```\n\n![image](https://user-images.githubusercontent.com/312873/35333798-26e3f95e-0121-11e8-86e1-4e0d5bd1b068.png)\n\n### #wp\n\nCall `wp` from any `app/` place:\n\n```ruby\nwp 'Authors through #wp method (called from controller):'\nwp @authors\n```\n\n![image](https://user-images.githubusercontent.com/312873/35333801-271a9c0c-0121-11e8-91d5-740706150c32.png)\n\n### #dump\n\nCall `dump` from views:\n\n```erb\n\u003c%= dump 'Books through #dump method (called from view):' %\u003e\n\u003c%= dump @books %\u003e\n```\n\n![image](https://user-images.githubusercontent.com/312873/35333799-26ffefba-0121-11e8-8021-a5faa62e6953.png)\n\n## Styling\n\nDebugExtras inject default CSS to the page on methods call. You can override styles and \nset your fonts, margins, etc using `.debug-extras` wrapper. Just look to the page sources to see \nthem at the end of head section.\n\nExample how to override default fonts in your stylesheet:\n```css\n.debug-extras pre,\n.debug-extras kbd {\n    font-family: Consolas, SFMono-Regular, Menlo, Monaco, Ubuntu, monospace !important;\n    font-size: 14px !important;\n    line-height: 18px !important;\n}\n```\nor may be you want to use `pre-wrap` rendering:\n```css\n.debug-extras pre {\n    white-space: pre-wrap !important;\n}\n```\n\u003eNote: if #wp and #dump results looks different compare to the screenshots above then default \nstyles were overridden by yours. \n\n## License\n\nDebugExtras is released under the [MIT License](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvavgustov%2Fdebug-extras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvavgustov%2Fdebug-extras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvavgustov%2Fdebug-extras/lists"}