{"id":15443851,"url":"https://github.com/gaogaotiantian/wthell","last_synced_at":"2025-04-19T20:23:08.319Z","repository":{"id":62589682,"uuid":"292121253","full_name":"gaogaotiantian/wthell","owner":"gaogaotiantian","description":"wthell is a debugging tool for python to interactively check frame stack when your code quit unexpectedly ","archived":false,"fork":false,"pushed_at":"2023-05-28T15:14:14.000Z","size":31,"stargazers_count":36,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T12:51:19.709Z","etag":null,"topics":["debugging","debugging-tools","python","traceback"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaogaotiantian.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":"2020-09-01T22:30:21.000Z","updated_at":"2024-11-14T18:50:26.000Z","dependencies_parsed_at":"2022-11-03T17:56:33.996Z","dependency_job_id":null,"html_url":"https://github.com/gaogaotiantian/wthell","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaogaotiantian%2Fwthell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaogaotiantian%2Fwthell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaogaotiantian%2Fwthell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaogaotiantian%2Fwthell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaogaotiantian","download_url":"https://codeload.github.com/gaogaotiantian/wthell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249198489,"owners_count":21228768,"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":["debugging","debugging-tools","python","traceback"],"created_at":"2024-10-01T19:37:14.916Z","updated_at":"2025-04-19T20:23:08.300Z","avatar_url":"https://github.com/gaogaotiantian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wthell\n\nwthell is a debugging tool for python to interactively check frame stack when your code did something unexpectedly\n\n## Install\n\nYou can install ```wthell``` from pip\n\n```\npip install wthell\n```\n\n## Usage\n\nIt's super easy to use wthell. Just run you script using wthell instead of python\n\n```\nwthell your_script.py args1 args2\n```\n\nIn linux shell, you can simply use this right after you command failed:\n\n```\nwthell !!\n```\n\nFun, isn't it?\n\nOr you can import wthell in your script and run your script normally\n\n```python\nimport wthell\n```\n\nIf there's an uncaught exception, you will enter an interactive shell like this:\n\n```python\n/home/gaogaotiantian/programs/wthell/test.py(6)\n  def g(a, b):\n      a += h(a)\n      b += 3\n\u003e     raise Exception(\"lol\")\n\n\nException raised: \u003cclass 'Exception'\u003e lol\n\nup(u)       -- go to outer frame  | down(d)  -- go to inner frame\nclear(cl)   -- clear the console  | reset(r) -- back to trigger frame\ncontinue(c) -- resume the program | ctrl+D   -- quit\nshow(s) \u003cfunc\u003e -- show source code of function \u003cfunc\u003e\n\n\u003e\u003e\u003e \n```\n\nYou will be in the frame(function) that raised exceptions in the beginning. \n\n* Type ```up``` to go to outer frame(its caller). \n* Type ```down``` to go to inner frame(when you already go out). \n* Type ```clear``` to clear the console prints\n* Type ```reset``` to go back to the original frame that triggered wthell\n* Type ```continue``` to resume the program\n* Type ```show \u003cfunc_name\u003e``` to show source code of a function\n\nwthell will record the full call stack so you can check any frame. \n\nWhile you are in a stack, you can type anything that you want to evaluation to help you debug.\n\n```python\n\u003e\u003e\u003e a\n13\n\u003e\u003e\u003e a + 1\n14\n\u003e\u003e\u003e h(a)\n16\n\u003e\u003e\u003e \n```\n\nOr you can trigger wthell anywhere in your code \n\n```python\ndef suspicious_function():\n    # I want to check here!\n    wthell.wth()\n```\n\nwthell behaves like an interactive shell. \n\nHappy debugging!\n\n## License\n\nCopyright Tian Gao, 2020.\n\nDistributed under the terms of the [Apache 2.0 license](https://github.com/gaogaotiantian/wthell/blob/master/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaogaotiantian%2Fwthell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaogaotiantian%2Fwthell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaogaotiantian%2Fwthell/lists"}