{"id":40669109,"url":"https://github.com/zero734kr/async-debug","last_synced_at":"2026-01-21T09:18:00.271Z","repository":{"id":61874013,"uuid":"555985451","full_name":"zero734kr/async-debug","owner":"zero734kr","description":"Asynchronous operation debugger built on top of async_hooks, inspired by asyncio debug mode of Python.","archived":false,"fork":false,"pushed_at":"2023-03-06T06:09:25.000Z","size":312,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T16:19:13.233Z","etag":null,"topics":["async","async-hooks","debug","performance","tracing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zero734kr.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":"2022-10-22T20:00:46.000Z","updated_at":"2022-10-30T13:01:47.000Z","dependencies_parsed_at":"2023-02-10T01:16:01.714Z","dependency_job_id":null,"html_url":"https://github.com/zero734kr/async-debug","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zero734kr/async-debug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero734kr%2Fasync-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero734kr%2Fasync-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero734kr%2Fasync-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero734kr%2Fasync-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zero734kr","download_url":"https://codeload.github.com/zero734kr/async-debug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zero734kr%2Fasync-debug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28630946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["async","async-hooks","debug","performance","tracing"],"created_at":"2026-01-21T09:18:00.183Z","updated_at":"2026-01-21T09:18:00.258Z","avatar_url":"https://github.com/zero734kr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asynchronous Operations Debugger\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cbr /\u003e\n\t\u003cp\u003e\n\t\t\u003ca href=\"https://www.npmjs.com/package/async-debug\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/async-debug.svg?maxAge=3600\" alt=\"npm version\" /\u003e\u003c/a\u003e\n\t\t\u003ca href=\"https://www.npmjs.com/package/async-debug\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/async-debug.svg?maxAge=3600\" alt=\"npm downloads\" /\u003e\u003c/a\u003e\n\t\u003c/p\u003e\n\u003c/div\u003e\n\n## About\n\n``async-debug`` is a Node.js module that debugs your asynchronous operations, inspired by [asyncio debug mode](https://docs.python.org/3/library/asyncio-dev.html#debug-mode) of python.\n\nCurrently, the only feature of this module is to listen for your asynchronous operations and log them to the console if they take too long to complete (considered \"slow\").\n\n## Limitation\n\nAs async_hooks does not provide information about the execution context, this module cannot provide the detailed location of where the operation was started like Python's asyncio. I will try to find a way to do this in the future. If you have any ideas, please let me know.\n\n## Installation\n\n```sh-session\nnpm install async-debug\nyarn add async-debug\npnpm add async-debug\n```\n\n## Usage\n\n```js\nimport { configure } from \"async-debug\";\n\nconst asyncDebugger = configure({\n    longTaskThreshold: 250, // 0.25 seconds, default is 300 (0.3 seconds)\n})\n\nif (process.env.NODE_ENV === 'development') {\n    asyncDebugger.enable();\n}\n\n// Your code here\n\n// Output:\n// Executing asynchronous operation 15 using HTTPCLIENTREQUEST took 313.654224999249ms to complete.\n```\n\nAnd that's it! You can now debug your asynchronous operations. \n\nIf you want to setup different thresholds for different operations, you can pass `object` to the ``longTaskThreshold`` parameter like below.\n\n```js\nconfigure({\n    longTaskThreshold: {\n        HTTPCLIENTREQUEST: 300,\n        TCPCONNECTWRAP: 100,\n        FSREQCALLBACK: 150,\n        // See https://nodejs.org/api/async_hooks.html#type\n    }\n})\n```\n\n### Configuration\n\nAll options are described as JSDoc comments, but if I think it's necessary, I'll add them here later.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzero734kr%2Fasync-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzero734kr%2Fasync-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzero734kr%2Fasync-debug/lists"}