{"id":16411022,"url":"https://github.com/phoe/trivial-custom-debugger","last_synced_at":"2026-02-08T13:33:15.078Z","repository":{"id":38744112,"uuid":"256023774","full_name":"phoe/trivial-custom-debugger","owner":"phoe","description":"Allows arbitrary functions to become the standard Lisp debugger","archived":false,"fork":false,"pushed_at":"2023-08-14T17:14:35.000Z","size":25,"stargazers_count":13,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T04:23:42.619Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phoe.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-15T20:03:03.000Z","updated_at":"2025-01-05T07:53:09.000Z","dependencies_parsed_at":"2024-11-10T00:44:17.065Z","dependency_job_id":"d0c23d6c-39ff-4d06-8e2f-471a5f8a262a","html_url":"https://github.com/phoe/trivial-custom-debugger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phoe/trivial-custom-debugger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoe%2Ftrivial-custom-debugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoe%2Ftrivial-custom-debugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoe%2Ftrivial-custom-debugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoe%2Ftrivial-custom-debugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phoe","download_url":"https://codeload.github.com/phoe/trivial-custom-debugger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoe%2Ftrivial-custom-debugger/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268682595,"owners_count":24289670,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"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":[],"created_at":"2024-10-11T06:44:23.167Z","updated_at":"2026-02-08T13:33:10.057Z","avatar_url":"https://github.com/phoe.png","language":"Common Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trivial-custom-debugger\n\n## Description\n\nThis is a portability library that allows one to fully override the standard debugger provided by their Common Lisp system for situations where binding `*debugger-hook*` is not enough - most notably, for `#'break`.\n\n* The main interface is the `with-debugger` macro that accepts a hook function that would be acceptable for `*debugger-hook*` (it must accept two arguments: a condition that the debugger is invoked with and a similar hook function).\n* A functional interface for the above is provided in form of `call-with-debugger`, which accepts a hook function and a zero-argument thunk.\n* It is possible, though not advisable, to install a debugger function globally across the whole Lisp system. The function `install-debugger` is provided for that case. (If you want to use it, you might want to contribute a matching `uninstall-debugger` function that restores the Lisp system to the previous state.)\n\nInside the debugger function:\n* the value of `*debugger-hook*` is `nil`,\n* the value of the second argument passed to the debugger function is the debugger function itself.\n\n## Purpose\n\nA basic building block that allows one to implement a portable, custom debugger for Common Lisp systems *in place* of the original system-provided one.\n\n## Example\n\n```lisp\nTRIVIAL-CUSTOM-DEBUGGER\u003e (with-debugger ((lambda (condition hook)\n                                           (declare (ignore hook))\n                                           (format t \";; Debugging a ~S!~%\" \n                                                   (type-of condition))\n                                           (throw :handled t)))\n                           (list (catch :handled (error 'error))\n                                 (catch :handled (break))\n                                 (let ((*break-on-signals* 'error))\n                                   (catch :handled (signal 'error)))\n                                 (catch :handled \n                                   (invoke-debugger (make-condition 'error)))))\n;; Debugging a ERROR!\n;; Debugging a SIMPLE-CONDITION!\n;; Debugging a SIMPLE-CONDITION!\n;; Debugging a ERROR!\n(T T T T)\n```\n\n## Limitations\n\nInside `with-debugger` or after calling `install`:\n* the value of `*debugger-hook*` is undefined,\n* the consequences are undefined if `*debugger-hook*` is set or rebound,\n* it is undefined whether the debugger hook or the debugger will be invoked first\n\n## Tests\n\nVery roughly tested on SBCL, CCL, ECL, Clasp, ABCL, CLISP, ACL, LispWorks, and Mezzano.\n\nTo run the test suite, evaluate `(asdf:test-system :trivial-custom-debugger)`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoe%2Ftrivial-custom-debugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphoe%2Ftrivial-custom-debugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoe%2Ftrivial-custom-debugger/lists"}