{"id":13802902,"url":"https://github.com/c4milo/node-webkit-agent","last_synced_at":"2025-05-15T10:07:41.605Z","repository":{"id":2813046,"uuid":"3814426","full_name":"c4milo/node-webkit-agent","owner":"c4milo","description":"NodeJS agent for WebKit devtools front-end","archived":false,"fork":false,"pushed_at":"2024-06-17T19:18:17.000Z","size":3280,"stargazers_count":1094,"open_issues_count":16,"forks_count":78,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-05-10T00:01:42.469Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://c4milo.github.io/node-webkit-agent/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c4milo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-03-24T02:00:11.000Z","updated_at":"2025-04-09T14:24:49.000Z","dependencies_parsed_at":"2024-10-08T16:14:53.089Z","dependency_job_id":"b506722f-f10e-40cd-9b14-d11fbd726c97","html_url":"https://github.com/c4milo/node-webkit-agent","commit_stats":{"total_commits":125,"total_committers":14,"mean_commits":8.928571428571429,"dds":"0.17600000000000005","last_synced_commit":"c61bc4e3952b8c853a08fcb7e2c2ce30a281eabd"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4milo%2Fnode-webkit-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4milo%2Fnode-webkit-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4milo%2Fnode-webkit-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c4milo%2Fnode-webkit-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c4milo","download_url":"https://codeload.github.com/c4milo/node-webkit-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319720,"owners_count":22051073,"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-04T00:02:03.894Z","updated_at":"2025-05-15T10:07:36.587Z","avatar_url":"https://github.com/c4milo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Webkit Agent\n[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/c4milo/node-webkit-agent?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Stories in Ready](https://badge.waffle.io/c4milo/node-webkit-agent.png?label=ready)](https://waffle.io/c4milo/node-webkit-agent)\n\n\nThis module is an implementation of\n[Chrome developer tools protocol](https://developer.chrome.com/devtools/docs/protocol/1.0/index).\nIt is still pretty much a work in progress and only heap and CPU profilers are working right now. Help is wanted to finish implementing debugger, networking and console agents as well as a implementing from scratch a flamegraphs agent.\n\n## Features\nThis module allows you to debug and profile remotely your nodejs applications\nleveraging the following features by re-using the [built-in devtools front-end](https://developer.chrome.com/devtools)\nthat comes with any webkit-based browsers such as Chrome or Safari.\n\n* Remote heap and CPU profiling\n* More agents are coming.\n\n## Installation\n`npm install webkit-devtools-agent`\n\n## Usage\nFrom within your Node application, just require the module as usual, and start the agent. For example:\n\n```javascript\nvar agent = require('webkit-devtools-agent');\nagent.start()\n```\n\nOnce the agent is initiated, use any of the following hosted Devtools UIs to profile your application.\n\n**Node v0.6.x:** http://c4milo.github.io/node-webkit-agent/19.0.1084.46/inspector.html?host=localhost:9999\u0026page=0\n\n**Node v0.8.x and v0.10.x:** http://c4milo.github.io/node-webkit-agent/26.0.1410.65/inspector.html?host=localhost:9999\u0026page=0\n\nYou can also change the agent port and binding address where it listen to by setting up the following parameters:\n\n* **port:** The port for the Devtools UI to connect to using websockets. Set to `9999` by default\n* **bind_to:** The host or IP address where the websockets service is going to be bound to. Set to `127.0.0.1` by default\n* **ipc_port:** IPC port for internal use. Set to `3333` by default\n* **verbose:** Whether to log more information or not. Set to `false` by default\n\nSee the example below to understand better how to set these parameters.\n\n### Example\nA more elaborated example looks like:\n\n```javascript\n\nvar agent = require('./index');\n\n// Assume this HTTP service is your service\nvar http = require('http');\nhttp.createServer(function (req, res) {\n    console.log('boooo');\n    res.writeHead(200, {'Content-Type': 'text/plain'});\n    res.end('Hello World\\n');\n}).listen(9000, '127.0.0.1');\nconsole.log('Server running at http://127.0.0.1:9000/ , pid-\u003e ' + process.pid);\n\n// Now let's have a signal handler for SIGUSR2 that is going\n// to activate the devtools agent. You can use any other means to activate\n// the agent, not just signal handlers.\nprocess.on('SIGUSR2', function () {\n  if (agent.server) {\n    agent.stop();\n  } else {\n    agent.start({\n        port: 9999,\n        bind_to: '0.0.0.0',\n        ipc_port: 3333,\n        verbose: true\n    });\n  }\n});\n\n\n```\n\n## ABI compatibility\n[ABI](http://en.wikipedia.org/wiki/Application_binary_interface) compatibility breaks between Node v0.6.x and v0.8.x. Therefore, if you switch Node versions you would have to re-install `webkit-devtools-agent` again. See issue [#11](https://github.com/c4milo/node-webkit-agent/issues/11).\n\n## Screenshots\n### CPU profiling\n![Screenshot](https://i.cloudup.com/YysNMMGE3a.png)\n\n### Heap Profiling\n![Screenshot](https://i.cloudup.com/WR5MKG6i02.png)\n\nFor detailed information on debugging memory leaks using devtools' heap comparisons (using this module), follow [this tutorial](https://developer.chrome.com/devtools/docs/javascript-memory-profiling).\n\n\nHappy Debugging!\n\n## License\n(The MIT License)\n\nCopyright 2014 Camilo Aguilar. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc4milo%2Fnode-webkit-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc4milo%2Fnode-webkit-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc4milo%2Fnode-webkit-agent/lists"}