{"id":22665151,"url":"https://github.com/br0ken-/behat-debug-extension","last_synced_at":"2025-03-29T09:28:51.082Z","repository":{"id":62492845,"uuid":"57597551","full_name":"BR0kEN-/behat-debug-extension","owner":"BR0kEN-","description":"Debug Behat scenarios","archived":false,"fork":false,"pushed_at":"2016-05-10T13:09:35.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T12:43:53.281Z","etag":null,"topics":["bdd","behat","behat-extension","tdd","testing"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/BR0kEN-.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}},"created_at":"2016-05-01T12:28:39.000Z","updated_at":"2016-05-07T09:39:12.000Z","dependencies_parsed_at":"2022-11-02T09:30:52.631Z","dependency_job_id":null,"html_url":"https://github.com/BR0kEN-/behat-debug-extension","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BR0kEN-%2Fbehat-debug-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BR0kEN-%2Fbehat-debug-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BR0kEN-%2Fbehat-debug-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BR0kEN-%2Fbehat-debug-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BR0kEN-","download_url":"https://codeload.github.com/BR0kEN-/behat-debug-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246165532,"owners_count":20734047,"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":["bdd","behat","behat-extension","tdd","testing"],"created_at":"2024-12-09T13:19:49.568Z","updated_at":"2025-03-29T09:28:51.061Z","avatar_url":"https://github.com/BR0kEN-.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Behat Debug Extension\n\nPrint any information you'd like to a command line during the test suite execution.\n\n[![Build Status](https://img.shields.io/travis/BR0kEN-/behat-debug-extension/master.svg?style=flat)](https://travis-ci.org/BR0kEN-/behat-debug-extension)\n[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/BR0kEN-/behat-debug-extension.svg?style=flat)](https://scrutinizer-ci.com/g/BR0kEN-/behat-debug-extension/code-structure)\n[![Quality Score](https://img.shields.io/scrutinizer/g/BR0kEN-/behat-debug-extension.svg?style=flat)](https://scrutinizer-ci.com/g/BR0kEN-/behat-debug-extension)\n[![Total Downloads](https://poser.pugx.org/behat/debug-extension/downloads)](https://packagist.org/packages/behat/debug-extension)\n[![Latest Stable Version](https://poser.pugx.org/behat/debug-extension/v/stable)](https://packagist.org/packages/behat/debug-extension)\n[![License](https://poser.pugx.org/behat/debug-extension/license)](https://packagist.org/packages/behat/debug-extension)\n\n## Usage\n\nAdd `@debug` tag to your feature definition:\n\n```gherkin\n@debug\nFeature: Test\n\n  Scenario: Test\n  # ...\n```\n\nAdd extension to your configuration file:\n\n```yml\ndefault:\n  extensions:\n    Behat\\DebugExtension: ~\n```\n\nExtend your object with a trait:\n\n```php\nuse Behat\\DebugExtension\\Debugger;\n\nclass Example\n{\n    use Debugger;\n}\n```\n\nUse the `debug` method wherever you like:\n\n```php\npublic function method()\n{\n    // ...\n    self::debug([\n        'Function arguments: %s',\n        'Second line',\n    ], [\n        var_export(func_get_args(), true),\n    ]);\n    // ...\n}\n```\n\nAs you can see the `debug` method processed by `sprintf()` function, so second argument for a method is an array of placeholders. \n\n### Messages\n\nAlso, with this extension, you able to print styled messages to a command line.\n\n```php\nnew \\Behat\\DebugExtension\\Message('comment', 2, [\n    'This is a first line of a message that will be printed to a command line.',\n    'Read documentation for this class to know how to use it.',\n]);\n```\n\n### Programmatic usage\n\n```shell\nexport BEHAT_DEBUG=true\n```\n\nThis environment variable tells that messages should be printed in any way.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbr0ken-%2Fbehat-debug-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbr0ken-%2Fbehat-debug-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbr0ken-%2Fbehat-debug-extension/lists"}