{"id":13624727,"url":"https://github.com/buggerjs/bugger","last_synced_at":"2025-04-16T01:32:04.737Z","repository":{"id":51543131,"uuid":"8703108","full_name":"buggerjs/bugger","owner":"buggerjs","description":"Bugs bugging you? Bug back.","archived":false,"fork":false,"pushed_at":"2016-12-12T20:32:36.000Z","size":2778,"stargazers_count":156,"open_issues_count":8,"forks_count":8,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-27T13:19:20.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/buggerjs.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":"2013-03-11T12:38:56.000Z","updated_at":"2024-04-01T03:40:56.000Z","dependencies_parsed_at":"2022-08-22T05:40:54.515Z","dependency_job_id":null,"html_url":"https://github.com/buggerjs/bugger","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggerjs%2Fbugger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggerjs%2Fbugger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggerjs%2Fbugger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggerjs%2Fbugger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buggerjs","download_url":"https://codeload.github.com/buggerjs/bugger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223691742,"owners_count":17186875,"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-08-01T21:01:45.604Z","updated_at":"2024-11-08T13:31:05.447Z","avatar_url":"https://github.com/buggerjs.png","language":"JavaScript","readme":"# bugger\n\n[![Build Status](https://travis-ci.org/buggerjs/bugger.png)](https://travis-ci.org/buggerjs/bugger)\n\n**Warning: Experimental**\n\n`bugger` provides Chrome Devtools bindings for node.\nIt integrates tightly with Chrome which means two things:\n\n* It attempts to fully support the usual Devtools experience, including workspaces and profiling tools.\n* It may break at any moment because Chrome moves fast.\n\n## Installation\n\n```bash\nnpm install -g bugger\n```\n\n## Usage\n\n### Start the script process\n\nStart `example/alive.js` in debug mode:\n\n```sh\nbugger example/alive.js\n```\n\nPass parameters to the script:\n\n```sh\n# This will be interpreted as a port paramter for alive.js\nbugger example/alive.js --port=3000\n# This will be interpreted as a port paramter for bugger itself\nbugger --port=3000 example/alive.js\n```\n\nPass V8 options (or advanced node options):\n\n```sh\nnode --trace_gc $(which bugger) example/alive.js\n```\n\n### Open the devtools\n\nThe correct URL will be written to the output. It should look similar to this:\n\nchrome-devtools://devtools/bundled/devtools.html?ws=127.0.0.1:8058/websocket\n\nYou can also open `chrome://inspect` if you started Chrome with `--remote-debugging-targets=localhost:8058`.\nThe process should pop up on that page almost immediately.\n\n## Options:\n\n* `-v, --version`: Print version information\n* `-h, --help`: Show usage help\n* `-p, --port`: The devtools protocol port to use, default: 8058\n* `-b, --brk`: Pause on the first line of the script\n\n## Examples:\nUsing bugger with popular frameworks is easy and it is a lot faster then using node-inspector.\n\n### Jest:\nRun `node` with bugger and jest:\n```bash\nnode --harmony $(which bugger) ./node_modules/jest-cli/bin/jest.js --runInBand\n```\nA chrome devtools URL will appear in console, just copy and paste it into chrome.\n\n### Mocha:\nRun bugger it with `_mocha`:\n```bash\nbugger --brk $(which _mocha)\n```\nA chrome devtools URL will appear in console, just copy and paste it into chrome.\n\n## Features\n\n### Console Tab\n\n- Basic support for console API\n- Evalute expressions in the console\n- Fully featured repl when not paused (including require)\n- Parts of the [Command Line API](https://developers.google.com/web/tools/chrome-devtools/debug/command-line/command-line-reference) supported\n\n### Sources Tab\n\n- Step-by-step debugging\n- Variable introspection\n- Live edit the running JavaScript code and persist it using workspaces (really just a Devtools feature)\n- Break on [uncaught] exception\n- Uses existing source maps (e.g. created via `babel --source-maps` or `coffee --map`)\n- [Forked modules](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options) show up as worker threads. This includes modules forked via `cluster`.\n\n#### Known Issues\n\n- For `babel-core/register` and `coffee-script/register`, editing the files doesn't work [#48](https://github.com/buggerjs/bugger/issues/48)\n\n### Network Tab\n\n- Monitor outgoing http(s) requests your script does\n- Timing of requests, including connect times etc.\n\n### Timeline Tab\n\n- GC events\n- Basic heap usage graphs\n\n#### Known Issues\n\n- The timeline tab doesn't do anything useful right now. In future it should show ([#47](https://github.com/buggerjs/bugger/issues/47)):\n  * `console.{time, timeEnd, timeStamp}`\n  * Network request\n  * Heap usage over time\n  * Profiling data\n\n### Profiles Tab\n\n- Heap snapshots\n- CPU profiles\n- Track heap allocations\n- [Inspect heap objects in the console via `$0..$4`](https://developers.google.com/web/tools/chrome-devtools/debug/command-line/command-line-reference#section-1)\n\n## Kudos to...\n\n### ...the original projects\n\nbugger was heavily inspired by [node-inspector](https://github.com/node-inspector/node-inspector) and\n[nodebug](https://github.com/billyzkid/nodebug).\n\n## Reference links\n\n- https://chromium.googlesource.com/chromium/blink.git\n- http://chromedevtools.github.io/debugger-protocol-viewer/Debugger/\n- https://github.com/nodejs/node\n","funding_links":[],"categories":["JavaScript","Packages","包"],"sub_categories":["Debugging / Profiling"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuggerjs%2Fbugger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuggerjs%2Fbugger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuggerjs%2Fbugger/lists"}