{"id":21906631,"url":"https://github.com/enlight/electron-inspector","last_synced_at":"2025-04-16T00:23:20.970Z","repository":{"id":57221692,"uuid":"67999927","full_name":"enlight/electron-inspector","owner":"enlight","description":"Debugger UI for the main Electron process","archived":false,"fork":false,"pushed_at":"2016-12-07T04:47:19.000Z","size":140,"stargazers_count":25,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-11T00:47:49.380Z","etag":null,"topics":["electron"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/enlight.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":"2016-09-12T10:35:40.000Z","updated_at":"2024-08-03T09:18:53.000Z","dependencies_parsed_at":"2022-08-29T04:10:13.544Z","dependency_job_id":null,"html_url":"https://github.com/enlight/electron-inspector","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enlight%2Felectron-inspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enlight%2Felectron-inspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enlight%2Felectron-inspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enlight%2Felectron-inspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enlight","download_url":"https://codeload.github.com/enlight/electron-inspector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226954896,"owners_count":17708904,"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":["electron"],"created_at":"2024-11-28T16:53:48.751Z","updated_at":"2024-11-28T16:53:49.300Z","avatar_url":"https://github.com/enlight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-inspector\nDebugger UI for the main Electron process\n\n## Overview\n\nThis package wraps [`node-inspector`][node-inspector-npm], which can be used to debug JavaScript\ncode running in the main Electron process. Getting `node-inspector` running can require somewhere\nbetween a little and [a lot of effort][node-inspector-electron-v13x] depending on the Electron\nversion you wish to debug. The goal of `electron-inspector` is to get `node-inspector` running\nwith minimum effort on your part.\n\n[node-inspector-npm]: https://www.npmjs.com/package/node-inspector\n[node-inspector-electron-v13x]: http://vadim.macagon.com/blog/2016/09/11/rebuilding-node-inspector-for-electron-v13x/\n\n## Prerequisites\n\n- NPM v3\n- NodeJS v4.5 (or later)\n- [`electron`][electron-npm], or [`electron-prebuilt`][electron-prebuilt-npm], or [`electron-prebuilt-compile`][electron-prebuilt-compile-npm]\n- [`electron-rebuild`][electron-rebuild-npm] (optional)\n\n[electron-npm]: https://www.npmjs.com/package/electron\n[electron-prebuilt-npm]: https://www.npmjs.com/package/electron-prebuilt\n[electron-prebuilt-compile-npm]: https://www.npmjs.com/package/electron-prebuilt-compile\n[electron-rebuild-npm]: https://www.npmjs.com/package/electron-rebuild\n\n## Quick Start\n\n`electron-inspector` should be installed as a local dev dependency of your Electron app: \n\n```shell\nnpm install electron-inspector --save-dev\n```\n\nThe easiest way to run the inspector in a cross-platform manner is to add an NPM script to your\n`package.json`, for example:\n\n```json\n\"scripts\": {\n  \"inspect-main\": \"electron-inspector\"\n}\n```\n\nThen run the `inspect-main` script on the command line with:\n\n```shell\nnpm run inspect-main\n```\n\nAlternatively, if you don't want to mess with your `package.json` you can directly execute\n`electron-inspector` (macOS / Linux), or `.\\\\node_modules\\\\.bin\\\\electron-inspector` (Windows).\n\nOn startup `electron-inspector` will check for compatibility of the native modules in\n`node-inspector` with the Electron version you wish to debug, if the compatibility check\nfails and `electron-rebuild` is installed then the native modules will be automatically\nrebuilt. You can disable auto-rebuild using the `--no-auto-rebuild` command line option.\n\nWhen `electron-inspector` finally gets `node-inspector` running you will see a URL printed to the\nconsole window. For example:\n\n```shell\nVisit http://127.0.0.1:8080/?port=5858 to start debugging.\n```\n\nYou can then [start Electron in debug mode][electron-debug] and open the given URL in your browser.\n\n[electron-debug]: http://electron.atom.io/docs/tutorial/debugging-main-process/#enable-debug-mode-for-electron \n\n## Known Bugs\n\n- Somewhere around Chrome 54 the DevTools front-end in `node-inspector` started crashing on startup\n  because it hasn't been updated in quite a while. `electron-inspector` contains a workaround for\n  the crash but upon opening the DevTools front-end you'll see\n  `Error: No NativeModule in target scope` printed out in the console, ignore it.\n- On some systems when you launch Electron with the `--debug-brk` flag in order to pause execution\n  on the first line of code it may look like the DevTools front-end never actually loads your app\n  code. In this case your app is actually paused on the first line of code, it's just that the\n  front-end wasn't refreshed to reflect that fact. You can force the DevTools front-end to refresh\n  by pressing the `Pause script execution (F8)` button.\n\n![Bugs](bugs.gif \"Working around the bugs\")\n\n## Configuration\n\n`node-inspector` can be configured in [multiple ways][node-inspector-config], `electron-inspector`\nwill pass through most of the supported command line options.\n\n[node-inspector-config]: https://www.npmjs.com/package/node-inspector#configuration\n\n### Command Line Options\n\n`electron-inspector` accepts most of the commandline options `node-inspector` does:\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth align=\"left\" width=\"25%\"\u003eOption\u003c/th\u003e\n      \u003cth align=\"left\"\u003eAlias\u003c/th\u003e\n      \u003cth align=\"left\"\u003eDefault\u003c/th\u003e\n      \u003cth align=\"left\"\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--help\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003e\n        Display information about the available options.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--auto-rebuild\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003etrue\u003c/td\u003e\n      \u003ctd\u003e\n        Toggle automatic rebuild of native node-inspector modules, this only works if\n        \u003ccode\u003eelectron-rebuild\u003c/code\u003e is installed.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--electron\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003e\n        Path to the Electron executable that should be used to run \u003ccode\u003enode-inspector\u003c/code\u003e.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cb\u003enode-inspector\u003c/b\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd/\u003e\n      \u003ctd/\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--config\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003e\n        Path to file with \u003ccode\u003enode-inspector\u003c/code\u003e config information.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--debug-port\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003e-d\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e5858\u003c/td\u003e\n      \u003ctd\u003e\n        Debug port of the Electron process you wish to debug.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--web-host\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003e0.0.0.0\u003c/td\u003e\n      \u003ctd\u003e\n        Host to listen on for \u003ccode\u003enode-inspector\u003c/code\u003e web interface, \u003ccode\u003e127.0.0.1\u003c/code\u003e by\n        default.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--web-port\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003ccode\u003e-p\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e8080\u003c/td\u003e\n      \u003ctd\u003e\n        Port to listen on for \u003ccode\u003enode-inspector\u003c/code\u003e web interface.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--save-live-edit\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003efalse\u003c/td\u003e\n      \u003ctd\u003e\n        Save live edit changes to disk (update the edited files).\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--preload\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003etrue\u003c/td\u003e\n      \u003ctd\u003e\n        Preload \u003ccode\u003e*.js\u003c/code\u003e files. You can disable this option to speed up the startup.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--inject\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003etrue\u003c/td\u003e\n      \u003ctd\u003e\n        Enable injection of debugger extensions into the debugged process. It's possible disable only\n        part of injections using subkeys, e.g. \u003ccode\u003e--no-inject.network\u003c/code\u003e.\n        Allowed keys: \u003ccode\u003enetwork\u003c/code\u003e, \u003ccode\u003eprofiles\u003c/code\u003e, \u003ccode\u003econsole\u003c/code\u003e.\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--hidden\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003e\n        Array of files to hide from the UI, breakpoints in these files will be ignored. All paths are\n        interpreted as regular expressions.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--stack-trace-limit\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003e\n        50\n      \u003c/td\u003e\n      \u003ctd\u003e\n        Number of stack frames to show on a breakpoint.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--ssl-key\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003e\n        Path to file containing a valid SSL key.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode\u003e--ssl-cert\u003c/code\u003e\u003c/td\u003e\n      \u003ctd/\u003e\n      \u003ctd/\u003e\n      \u003ctd\u003e\n        Path to file containing a valid SSL certificate.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenlight%2Felectron-inspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenlight%2Felectron-inspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenlight%2Felectron-inspector/lists"}