{"id":15946170,"url":"https://github.com/eces/debugs","last_synced_at":"2025-04-03T22:26:14.203Z","repository":{"id":69836676,"uuid":"108204726","full_name":"eces/debugs","owner":"eces","description":"🙈 UI for DEBUG=debug:*","archived":false,"fork":false,"pushed_at":"2018-01-17T08:17:49.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T21:44:27.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/eces.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":"2017-10-25T01:38:33.000Z","updated_at":"2018-01-02T01:54:46.000Z","dependencies_parsed_at":"2023-03-11T07:14:50.315Z","dependency_job_id":null,"html_url":"https://github.com/eces/debugs","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":"0.045454545454545414","last_synced_commit":"258b97b65845443c1ffa7a2ad4f58e824e787aad"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eces%2Fdebugs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eces%2Fdebugs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eces%2Fdebugs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eces%2Fdebugs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eces","download_url":"https://codeload.github.com/eces/debugs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247087782,"owners_count":20881458,"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-10-07T09:20:31.247Z","updated_at":"2025-04-03T22:26:14.180Z","avatar_url":"https://github.com/eces.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# debugs 🙈\n\n`npm install debugs -g` \n\n\u003cimg src=\"https://github.com/eces/debugs/blob/master/assets/debug-a.png?raw=true\"\u003e → \u003cimg src=\"https://github.com/eces/debugs/blob/master/assets/debug-b.png?raw=true\"\u003e\n\n## Features\n\n- No more remember debug scopes.\n- Choose debug scopes on `debugs` with keyboard.\n- Loaded from `package.json` and subdirectories.\n- Replace `DEBUG=debug:*` to `DEBUG=${debugs -v}`.\n- Configure bash/zsh/shell export by typing `debugs init`.\n- See flatten debugs options over subdirectories.\n\n## Usage\n\nUse [debug](https://github.com/visionmedia/debug) for logging. \n\n\u003e peerDependencies `debug` must be installed.\n\n```js\n// Basic use of debug package.\nconst debug_api = require('debug')('api')\nconst debug_api_cache = require('debug')('api:cache')\n\n// outputs only if environment variable DEBUG has 'api' scope.\ndebug_api('api.validate %O', doSomething())\n  \n/* \n * outputs only if environment variable DEBUG has \n * 'api:cache' or 'api:*' or 'api*' \n * scope. \n */\ndebug_db('api.cache.validate %O', doSomething())\n```\n\n\nAdd debug namespace items on `package.json`.\n\n```\n{\n  \"name\": \"example\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\",\n  \"debugs\": [\n    \"api\",\n    \"api:cache\"\n  ]\n}\n```\n\nType `debugs` will show below.\n\n```bash\n? DEBUG=\n❯ ◯ api\n  ◯ api:cache\n```\n\n\u003e Press \u0026lt;space\u0026gt; to select, \u0026lt;a\u0026gt; to toggle all, \u0026lt;i\u0026gt; to inverse selection\n\n\nChoose any and press enter(return).\n\n```\n? DEBUG=\n ◯ api\n❯◉ api:cache\n\n? DEBUG= api:cache\n\n$ \n```\n\nIt's done. Apply changes by `$ DEBUG=$(debugs -v) npm start` or\n\n```js\n// any-file.js\n\n// will load package.json at project directory root.\nrequire('debugs/init')\n```\n\n\u003e You may add `.debugs` to `.gitignore`.\n\n## Advanced use\n\nRunning `debugs` with \n\n- option `--c`, `-v` and `value` will partial output `api,api:cache`.\n- option `--init`, `-i` and `init` will full output `export DEBUG=api,api:cache`.\n\nEdit start script to pre-apply debug values,\n\n```bash\n\"scripts\": {\n  \"start\": \"DEBUG=$(debugs -v) node index.js\",\n},\n\n# DEBUG=$(debugs -v) nodemon index.js\n```\n\nprestart script either.\n\n```bash\n\"scripts\": {\n  \"prestart\": \"$(debugs init)\",\n  \"start\": \"node index.js\"\n}\n```\n\n\nWithout global install:\n\n```bash\n# shell\n$ npm install --save-dev debugs\n\n# package.json\n\"scripts\": {\n  \"start\": \"DEBUG=$(node ./node_modules/debugs -v) node index.js\",\n  \"debug\": \"node ./node_modules/debugs\"\n}\n\n# shell\n$ npm run debug\n```\n\nInclude other json file or subdirectories.\n\n```\n{\n  \"name\": \"example\",\n  \"version\": \"1.0.0\",\n  \"main\": \"index.js\",\n  \"debugs\": [\n    \"api\",\n    \"api:cache\",\n    \"lib/something/package.json\"\n  ]\n}\n```\n\n\u003ckbd\u003eNEW\u003ckbd\u003e Group all peer debugs into one state over subdirectories. (flatten)\n```\n.\n├── package.json\n├── peer1\n│   └── package.json\n└── peer2\n    ├── package.json\n    └── peer2a\n        └── package.json\n```\n\nOnly one `.debugs` root state file will be saved, and readable from any current working directory.\n\n\n## Authors\n\n- Jin Lee\n\n## License\n\n- MIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feces%2Fdebugs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feces%2Fdebugs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feces%2Fdebugs/lists"}