{"id":13527913,"url":"https://github.com/electron-userland/devtron","last_synced_at":"2025-04-08T00:38:22.243Z","repository":{"id":42160600,"uuid":"51622074","full_name":"electron-userland/devtron","owner":"electron-userland","description":"[LOOKING FOR MAINTAINERS] An Electron DevTools Extension","archived":false,"fork":false,"pushed_at":"2023-04-17T01:23:53.000Z","size":1257,"stargazers_count":1727,"open_issues_count":46,"forks_count":101,"subscribers_count":33,"default_branch":"master","last_synced_at":"2024-10-29T17:52:04.851Z","etag":null,"topics":["devtools","electron"],"latest_commit_sha":null,"homepage":"https://electronjs.org/devtron","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/electron-userland.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":"2016-02-12T22:57:24.000Z","updated_at":"2024-10-22T09:59:25.000Z","dependencies_parsed_at":"2024-06-18T12:18:46.786Z","dependency_job_id":"62c5f08f-61e1-49f7-a90b-508d1b1ff1fc","html_url":"https://github.com/electron-userland/devtron","commit_stats":{"total_commits":386,"total_committers":14,"mean_commits":"27.571428571428573","dds":"0.13471502590673579","last_synced_commit":"c2d06028bb75c5cc5567b272a866e6d6e75223df"},"previous_names":["electron/devtron"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Fdevtron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Fdevtron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Fdevtron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Fdevtron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron-userland","download_url":"https://codeload.github.com/electron-userland/devtron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755560,"owners_count":20990620,"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":["devtools","electron"],"created_at":"2024-08-01T06:02:06.511Z","updated_at":"2025-04-08T00:38:22.223Z","avatar_url":"https://github.com/electron-userland.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\n\u003e 🚨 **WARNING:** Devtron is currently **unmaintained**. If you're interested in becoming a maintainer, see Issue [#200](https://github.com/electron-userland/devtron/issues/200) for more information.\n# \u003cimg src=\"https://cloud.githubusercontent.com/assets/378023/15063285/cf554e40-1383-11e6-9b9c-45d381b03f9f.png\" width=\"60px\" align=\"center\" alt=\"Devtron icon\"\u003e Devtron\n\nAn [Electron](http://electron.atom.io) [DevTools](https://developer.chrome.com/devtools)\nextension to help you inspect, monitor, and debug your app.\n\n[![Travis Build Status](https://travis-ci.org/electron/devtron.svg?branch=master)](https://travis-ci.org/electron/devtron)\n[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/t9eqglwos7kyv6w3/branch/master?svg=true)](https://ci.appveyor.com/project/electron-bot/devtron/branch/master)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\n[![downloads:?](https://img.shields.io/npm/dm/devtron.svg)](https://www.npmjs.com/packages/devtron)\n\n![screenshot](https://cloud.githubusercontent.com/assets/378023/15036521/e3e7cd06-12ca-11e6-8054-ed0455015f05.png)\n\n## Features\n\n  * **Require graph** to help you visualize your app's internal and external\n    library dependencies in both the main and renderer processes.\n  * **IPC monitor** to track and inspect the messages sent and received\n    between the renderer and main processes in your app.\n  * **Event inspector** that shows the events and listeners that are registered\n    in your app on the core Electron APIs such as the window, the app, and the\n    processes.\n  * **App Linter** that checks your apps for possible issues and missing\n    functionality.\n\n## Installing\n\n```sh\nnpm install --save-dev devtron\n```\n\nThen execute the following from the Console tab of your running Electron app's\ndeveloper tools:\n\n```js\nrequire('devtron').install()\n```\n\nYou should then see a `Devtron` tab added.\n\n## Disabled Node Integration\n\nIf your application's `BrowserWindow` was created with `nodeIntegration` set\nto `false` then you will need to expose some globals via a [preload](http://electron.atom.io/docs/api/browser-window/#new-browserwindowoptions)\nscript to allow Devtron access to Electron APIs:\n\n```js\nwindow.__devtron = {require: require, process: process}\n```\n\nThen restart your application and Devtron should successfully load. You may\nwant to guard this assignment with a `if (process.env.NODE_ENV === 'development')`\ncheck to ensure these variables aren't exposed in production.\n\n## Developing locally\n\n```\ngit clone https://github.com/electron/devtron\ncd devtron\nnpm install\nnpm start\n```\n\nThis will start a process that watches and compiles the extension as files\nare modified.\n\nThen open the Console tab of your Electron app and run the following with the\npath updated for the location that you've cloned devtron to:\n\n```js\nrequire('/Users/me/code/devtron').install()\n```\n\nThen a Devtron tab should appear and it will now be enabled for that\napplication.\n\nYou can reload the extension by closing and reopening the dev tools.\n\n### Running in a browser\n\nTo make developing and debugging the extension easier, you can run it in a\nChrome tab that will talk remotely to a running Electron app over HTTP.\n\n- Set the `DEVTRON_DEBUG_PATH` environment variable to the path of the cloned\n  devtron repository.\n- Start your Electron application.\n- Click the **Devtron** tab.\n- You should then see the following messages logged to the **Console** tab:\n\n  \u003e Devtron server listening on http://localhost:3948\n  \u003e\n  \u003e Open file:///Users/me/devtron/static/index.html to view\n\n- Then open `/Users/me/devtron/static/index.html` in Chrome\n- The page there will talk remotely to the running Electron app so you'll\n  be able to fully interact with each pane with real data.\n  \n### Additional Notes\n\n- `require('devtron').install()` cannot be called before the `ready` event of the `app` module has been emitted.\n\n#### Webpack\n\nWhen using webpack, you may experience issues resolving `__dirname`. In accordance with the [docs](https://webpack.js.org/configuration/node/#node-__dirname), `__dirname` is resolved at runtime on the compiled file.\n\nYou have to two solutions: \n 1. Remove `devtron` from Webpack bundle with `config.externals`\n 2. Copy `devtron` files to the same folder as your compiled main process file\n\n#### [Solution 1] Remove from webpack bundle\n\n```js\nconfig.externals = [\n  function(context, request, callback) {\n    if (request.match(/devtron/)) {\n      return callback(null, 'commonjs ' + request)\n    }\n\n    callback()\n  }\n]\n```\n\n#### [Solution 2] Copy devtron files\n 1. Make sure that webpack does not replace `__dirname` by setting:\n   ```js\n   // in your webpack config for main process\n   {\n     target: 'electron-main',\n     node: {\n       __dirname: false,\n     }\n   }\n   ```\n 2. Ensure that the copy target for `devtron/manifest.json` is the same folder as your compiled main process `js` file.\n 3. Ensure that the copy target for the `devtron/out/browser-globals.js` is `out/browser-globals.js` relative to your compiled main process `js` file.\n \nYou can copy files with `copy-webpack-plugin`.\n\n```js\nconst path = require('path');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\n\nconst copyFiles = [\n  {\n    from: path.resolve(__dirname, 'node_modules/devtron/manifest.json')\n  }, \n  {\n    from: path.resolve(__dirname, 'node_modules/devtron/out/browser-globals.js'),\n    to: path.resolve(__dirname, 'out'),\n  }\n];\n\nconfig.target = 'electron-main',\nconfig.plugins = [\n  new CopyWebpackPlugin(copyFiles),\n]\n```\n\n## Contributing\n\nHave an idea for something this extension could do to make debugging Electron\napps easier? Please [open an issue](https://github.com/electron/devtron/issues/new).\n\nPull requests are also welcome and appreciated. Run `npm test` to run the\nexisting tests. This project uses the [standard JavaScript style](http://standardjs.com).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron-userland%2Fdevtron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron-userland%2Fdevtron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron-userland%2Fdevtron/lists"}