{"id":13791487,"url":"https://github.com/AlexKnauth/debug","last_synced_at":"2025-05-12T14:30:46.692Z","repository":{"id":45136043,"uuid":"44064522","full_name":"AlexKnauth/debug","owner":"AlexKnauth","description":"a racket lang-extension for debugging, and a macro for inserting a debug-repl","archived":false,"fork":false,"pushed_at":"2022-05-21T15:55:00.000Z","size":50,"stargazers_count":36,"open_issues_count":6,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T12:16:37.782Z","etag":null,"topics":["debug","racket"],"latest_commit_sha":null,"homepage":"","language":"Racket","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexKnauth.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":"2015-10-11T18:39:43.000Z","updated_at":"2023-12-26T11:17:52.000Z","dependencies_parsed_at":"2022-08-26T08:23:21.681Z","dependency_job_id":null,"html_url":"https://github.com/AlexKnauth/debug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexKnauth%2Fdebug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexKnauth%2Fdebug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexKnauth%2Fdebug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexKnauth%2Fdebug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexKnauth","download_url":"https://codeload.github.com/AlexKnauth/debug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253754959,"owners_count":21958933,"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":["debug","racket"],"created_at":"2024-08-03T22:01:00.914Z","updated_at":"2025-05-12T14:30:42.876Z","avatar_url":"https://github.com/AlexKnauth.png","language":"Racket","funding_links":[],"categories":["Racket"],"sub_categories":[],"readme":"debug\n==\nA lang-extension for debugging, based on sugar/debug from [mbutterick/sugar](https://github.com/mbutterick/sugar)\n\ndocumentation: http://pkg-build.racket-lang.org/doc/debug/index.html\n\n### `#lang debug`\n\nTo debug the value of an expression, simply put `debug` in front of the language at the top of\nthe file (for instance `#lang debug racket`), and put `#R`, `#RR` or `#RRR` in front of the\nexpression.\n\n- `#R` reports the value and returns it\n- `#RR` reports the value with a line number and returns it\n- `#RRR` reports the value with the file and line number, and returns it\n\n```racket\n#lang debug racket\n#R(+ 1 2)\n```\nShows the output:\n```\n(+ 1 2) = 3\n3\n```\n\n```racket\n#lang debug racket\n(+ 1 2 #R(* 3 4))\n```\nShows the output:\n```\n(* 3 4) = 12\n15\n```\n\n### `#lang debug/no-output`\n\nAllows `#R`, `#RR` and `#RRR` like `#lang debug`, but they don't add any debug output, they just return the expression inside.\n\n### `debug-repl`\n\n```racket\n\u003e (require debug/repl)\n\u003e (define (f x y)\n    (debug-repl))\n\u003e (f 1 2)\n-\u003e ; in the debug-repl now\n   x\n1\n-\u003e y\n2\n-\u003e (+ x y)\n3\n-\u003e ; exit the debug-repl by pressing ctrl-D\n\u003e ; back in the normal repl\n  (f (λ (g a) (g a)) (list add1 4))\n-\u003e ; a new debug-repl\n   x\n#\u003cprocedure\u003e\n-\u003e y\n(list #\u003cprocedure:add1\u003e 4)\n-\u003e (x string-\u003enumber \"3\")\n3\n-\u003e (x (first y) (second y))\n5\n-\u003e ; exit this debug-repl by pressing ctrl-D\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexKnauth%2Fdebug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexKnauth%2Fdebug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexKnauth%2Fdebug/lists"}