{"id":15406852,"url":"https://github.com/dannyben/pretty_trace","last_synced_at":"2026-01-16T19:40:00.029Z","repository":{"id":25336516,"uuid":"103759206","full_name":"DannyBen/pretty_trace","owner":"DannyBen","description":"Love Your Ruby's Backtrace","archived":false,"fork":false,"pushed_at":"2024-01-27T16:22:14.000Z","size":656,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T14:12:10.065Z","etag":null,"topics":["backtrace","debugging","gem","ruby"],"latest_commit_sha":null,"homepage":null,"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/DannyBen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-16T14:42:03.000Z","updated_at":"2024-08-25T12:00:17.870Z","dependencies_parsed_at":"2024-01-27T17:29:57.656Z","dependency_job_id":"d125af47-b9dc-446b-bcc4-1c446eb5eaea","html_url":"https://github.com/DannyBen/pretty_trace","commit_stats":{"total_commits":94,"total_committers":2,"mean_commits":47.0,"dds":0.2978723404255319,"last_synced_commit":"278e719050b256f259940a0ab1fe208ee2d4d0c6"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fpretty_trace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fpretty_trace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fpretty_trace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DannyBen%2Fpretty_trace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DannyBen","download_url":"https://codeload.github.com/DannyBen/pretty_trace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":220053640,"owners_count":16588698,"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":["backtrace","debugging","gem","ruby"],"created_at":"2024-10-01T16:25:56.867Z","updated_at":"2026-01-16T19:40:00.021Z","avatar_url":"https://github.com/DannyBen.png","language":"Ruby","readme":"\u003cdiv align='center'\u003e\n\n# Pretty Trace - Pretty Errors and Backtrace\n\n![screenshot](support/screenshot/screenshot.png)\n\n\u003c/div\u003e\n\n---\n\n\n\nMake your Ruby backtrace pretty again. Just require `pretty_trace/enable` \nin your ruby script, and errors will become clearer and more readable.\n\n---\n\n\n## Install\n\n```shell\n$ gem install pretty_trace\n```\n\nOr with bundler:\n\n```ruby\n# Just install, do not activate\ngem 'pretty_trace'\n\n# Or, install and enable\ngem 'pretty_trace', require: 'pretty_trace/enable'\n\n# Or, install, enable and enable trimming\ngem 'pretty_trace', require: 'pretty_trace/enable-trim'\n```\n\n\n## Quick Start\n\n```ruby\n# test.rb\nrequire \"pretty_trace/enable-trim\"\nrequire \"fileutils\"\n\nFileUtils.rm 'no_such_file'\n```\n\n## Usage\n\nThe easiest way to use Pretty Trace is to require its activation script in\nyour script:\n\n```ruby\nrequire 'pretty_trace/enable'\n```\n\nFrom this point on, any exception will be formatted.\n\nIf you wish to show a trimmed version of the backtrace (where errors from the\nsame file are collapsed into one line), require this script instead:\n\n```ruby\nrequire 'pretty_trace/enable-trim'\n```\n\nIf you prefer to have more control, you can configure these settings \nmanually:\n\n```ruby\nrequire 'pretty_trace'\n\n# Exceptions here will not be formatted\n\nPrettyTrace.enable\n# Exceptions here will be formatted\n\nPrettyTrace.disable\n# Exceptions here will not be formatted\n\nPrettyTrace.enable\nPrettyTrace.trim\nPrettyTrace.reverse\n# Exceptions here will be formatted, trimmed and in reverse order\n\nPrettyTrace.no_trim\nPrettyTrace.no_reverse\n# Exceptions here will not be trimmed or reversed\n```\n\n\n## Configuration\n\n### Filtering specific paths\n\nTo filter out lines in the backtrace, use `PrettyTrace.filter`. This method\naccepts a single regular expression, or an array of regular expressions.\n\nNote that you can call this method several times, and it will aggregate all\nyour filters together.\n\n```ruby\nrequire 'pretty_trace/enable'\nPrettyTrace.filter /rails/\nPrettyTrace.filter [/gem/, /lib/]\n```\n\nIf you wish to temporarily disable Pretty Trace (for example, when you need \nto see the full trace paths), you can set the environment variable \n`PRETTY_TRACE=off` before running your script:\n\n```shell\n$ PRETTY_TRACE=off ruby myscript.rb\n```\n\nIf you wish to temporarily disable trimming and filtering, you can set the\nenvironment variable `PRETTY_TRACE=full` before running your script:\n\n```shell\n$ PRETTY_TRACE=full ruby myscript.rb\n```\n\n### Showing a debug tip\n\nIf you wish to see a debug tip, reminding you to set `PRETTY_TRACE` to `full` or `off` when an error occurs, use `PrettyTrace.debug_tip`:\n\n```ruby\nrequire 'pretty_trace/enable'\nPrettyTrace.debug_tip     # enable debug tip\nPrettyTrace.no_debug_tip  # disable debug tip\n```\n\n## Contributing / Support\n\nIf you experience any issue, have a question or a suggestion, or if you wish\nto contribute, feel free to [open an issue][issues].\n\n---\n\n[issues]: https://github.com/DannyBen/pretty_trace/issues\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Fpretty_trace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdannyben%2Fpretty_trace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdannyben%2Fpretty_trace/lists"}