{"id":34056872,"url":"https://github.com/akuhn/print-considered-harmful","last_synced_at":"2026-05-27T18:03:20.593Z","repository":{"id":57454812,"uuid":"127565919","full_name":"akuhn/print-considered-harmful","owner":"akuhn","description":"Switch from print to debugger() and never look back!","archived":false,"fork":false,"pushed_at":"2018-04-20T14:40:23.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-15T22:23:42.713Z","etag":null,"topics":["debug","debugging","printf"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/akuhn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-31T19:51:00.000Z","updated_at":"2018-08-19T00:19:26.000Z","dependencies_parsed_at":"2022-09-05T05:41:28.939Z","dependency_job_id":null,"html_url":"https://github.com/akuhn/print-considered-harmful","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akuhn/print-considered-harmful","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akuhn%2Fprint-considered-harmful","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akuhn%2Fprint-considered-harmful/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akuhn%2Fprint-considered-harmful/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akuhn%2Fprint-considered-harmful/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akuhn","download_url":"https://codeload.github.com/akuhn/print-considered-harmful/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akuhn%2Fprint-considered-harmful/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33577636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["debug","debugging","printf"],"created_at":"2025-12-14T03:05:39.508Z","updated_at":"2026-05-27T18:03:20.588Z","avatar_url":"https://github.com/akuhn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Print statement considered harmful\n\nSwitch from `print` to `debugger()` and never look back.\n\n    import debug\n\n    debugger() # \u003c-- breaks here\n\nImport this module in your main file to add `debugger` as a builtin command.\n\n\n## Documentation\n\nAll functions\n\n    debugger()\n    debugger.enable()\n    debugger.disable()\n    debug.wrap(function)\n    debug.sample(function)\n    function.samples\n\n\nCalling `debugger` opens the `ipdb` debugger,\n\n    import debug\n\n    debugger() # \u003c-- breaks here\n\n\nCalling `debugger.disable` from the ipdb prompt disables all breakpoints,\n\n    import debug\n\n    debugger() # \u003c-- breaks here\n\n    # \u003e\u003e debugger.disable()\n    # \u003e\u003e continue\n\n    debugger() # \u003c-- does not break here\n\n\nUsing `debug.wrap` sets a function breakpoint,\n\n    def fun():\n        pass\n\n    def example():\n        fun()\n\n    fun = debug.wrap(fun)\n    example() # \u003c-- breaks above at definition of fun\n\n\nUsing `debug.sample` collects function arguments,\n\n    def fun(a, b=None):\n        return\n\n    fun = debug.sample(fun)\n    fun(23)\n    fun(42, 'hello worlds')\n\n    debugger() # \u003c-- breaks here\n\n    # \u003e\u003e len(fun.samples)\n    # 2\n    # \u003e\u003e fun.samples\n    # [{0: 23, '$': 529}, {0: 42, 'b': 'hello worlds', '$': 1764}]\n\n\nUsing `debug.log` collects values,\n\n    for each in range(3):\n        debug.log(each)\n\n    debugger() # \u003c-- breaks here\n\n    # \u003e\u003e debugger.logs\n    # {'example.py': {2: [0, 1, 2]}}\n\n\n## Installation\n\nTo install this package, run\n\n    pip install print-considered-harmful\n\n\n## Contributing\n\nBug reports and pull requests are welcome on github at, https://github.com/akuhn/print-considered-harmful\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakuhn%2Fprint-considered-harmful","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakuhn%2Fprint-considered-harmful","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakuhn%2Fprint-considered-harmful/lists"}