{"id":18262912,"url":"https://github.com/midwayjs/debugger","last_synced_at":"2025-04-09T01:24:58.750Z","repository":{"id":45242016,"uuid":"252062750","full_name":"midwayjs/debugger","owner":"midwayjs","description":"Currency Debug","archived":false,"fork":false,"pushed_at":"2022-05-30T07:09:35.000Z","size":28,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-02-14T19:36:38.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/midwayjs.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","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-04-01T03:31:51.000Z","updated_at":"2022-05-30T07:09:37.000Z","dependencies_parsed_at":"2022-09-09T22:50:54.814Z","dependency_job_id":null,"html_url":"https://github.com/midwayjs/debugger","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fdebugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fdebugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fdebugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fdebugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midwayjs","download_url":"https://codeload.github.com/midwayjs/debugger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247954582,"owners_count":21024244,"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":[],"created_at":"2024-11-05T11:09:16.357Z","updated_at":"2025-04-09T01:24:58.733Z","avatar_url":"https://github.com/midwayjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# debugger\n\n通用的 debug 包裹，让一个方法有了单步调试的能力，可以用在 cli 等情况下支持 `--debug` 参数启动单步调试。\n\n### Usage\n```sh\nnpm i @midwayjs/debugger --save\n```\n\n```ts\n// function.ts\nimport { debugWrapper } from '@midwayjs/debugger';\nexport const fun = async (arg1, arg2) =\u003e {\n  await new Promise(resolve =\u003e setTimeout(resolve, 1000));\n  return arg1 + arg2;\n}\n\nexport const wrapFun = debugWrapper({\n  file: __filename,           // 要包裹的方法所在文件\n  export: 'fun',              // 要包裹的方法的方法名\n  debug: process.env.DEBUG    // 是否开启debug，true即开启\n});\n```\n\n## License\n\n[MIT](http://github.com/midwayjs/debugger/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidwayjs%2Fdebugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidwayjs%2Fdebugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidwayjs%2Fdebugger/lists"}