{"id":13766673,"url":"https://github.com/parro-it/debug-menu","last_synced_at":"2025-07-19T19:08:08.602Z","repository":{"id":66074128,"uuid":"45754599","full_name":"parro-it/debug-menu","owner":"parro-it","description":"Chrome-like debugging context menu for electron.","archived":false,"fork":false,"pushed_at":"2022-10-28T09:33:53.000Z","size":140,"stargazers_count":135,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-27T18:04:21.203Z","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/parro-it.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":"2015-11-07T21:07:05.000Z","updated_at":"2024-06-02T00:04:47.000Z","dependencies_parsed_at":"2023-04-12T11:49:42.537Z","dependency_job_id":null,"html_url":"https://github.com/parro-it/debug-menu","commit_stats":{"total_commits":49,"total_committers":7,"mean_commits":7.0,"dds":"0.24489795918367352","last_synced_commit":"94e71fefa2c114658d1ade8c74933c098736bfd2"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/parro-it/debug-menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fdebug-menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fdebug-menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fdebug-menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fdebug-menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parro-it","download_url":"https://codeload.github.com/parro-it/debug-menu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parro-it%2Fdebug-menu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265992789,"owners_count":23860977,"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-03T16:00:59.293Z","updated_at":"2025-07-19T19:08:08.577Z","avatar_url":"https://github.com/parro-it.png","language":"JavaScript","readme":"# debug-menu\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/parro-it/debug-menu.svg)](https://greenkeeper.io/)\n\nChrome-like \"inspect element\" context-menu for [Electron](http://electron.atom.io)\n\n\u003e This module was extracted from [electron-debug](https://github.com/sindresorhus/electron-debug) to keep it focused on its main features.\n\n[![Travis Build Status](https://img.shields.io/travis/parro-it/debug-menu.svg)](http://travis-ci.org/parro-it/debug-menu)\n[![npm module](https://img.shields.io/npm/v/debug-menu.svg)](https://npmjs.org/package/debug-menu)\n[![npm downloads](https://img.shields.io/npm/dt/debug-menu.svg)](https://npmjs.org/package/debug-menu)\n\n# Context menu items\n\n## Inspect element\n\nInspect the clicked HTML element.\nIt shows DevTools if it's not already opened.\n\n\n# Install\n\n```\n$ npm install --save-dev debug-menu\n```\n\n# Usage\n\nWhen you use this module in renderer process code,\n`BrowserWindow` instance need to be opened with node integration enabled.\n\nWe usually load this module only if the `DEBUG` environment variable is defined, to avoid end users of the app inadvertently opening DevTools.\n\n```js\nconst debugMenu = require('debug-menu');\ndebugMenu.install();  // activate context menu\n\n// later, if needed\ndebugMenu.uninstall();  // deactivate context menu\n```\n\n# API\n\n## debugMenu.install()\n\nActivate context menu. This method add a listener on `window` DOM object `contextmenu` event.\n\n## debugMenu.middleware\n\nExpose a middleware context menu that can be mounted with [electron-contextmenu-middleware](https://github.com/parro-it/electron-contextmenu-middleware). See [related example](#middleware-example)\n\n\n\n## debugMenu.uninstall()\n\nDeactivate context menu. This method remove the listener on `window` object.\n\n## debugMenu.windowDebugMenu(win);\n\nThe debug [Menu](http://electron.atom.io/docs/latest/api/menu/) object template. You can use it to integrate with your own app context or `BrowserWindow` menu.\n\n### Arguments\n\n* win\n\n`BrowserWindow` instance to use for this Menu.\n\nType: `BrowserWindow`\u003cbr\u003e\nDefault: the currently focused `BrowserWindow`.\n\n# Example\n\n```js\n  // ... require electron module\n\n  const debugMenu = require('debug-menu');\n  const win = new BrowserWindow();\n\n  const menu = Menu.buildFromTemplate([{\n    label: 'Debug',\n    submenu: debugMenu.windowDebugMenu(win)\n  }]);\n\n  if (process.platform !== 'darwin') {\n    win.setMenu(menu);\n  } else {\n    electron.Menu.setApplicationMenu(menu);\n  }\n\n  // ... show window\n```\n\n# Middleware example\n\n```js\n  const debugMenu = require('debug-menu').middleware;\n  const context = require('electron-contextmenu-middleware');\n\n  context.use(debugMenu);\n\n  context.activate();\n```\n\n# Related projects\n\n* [electron-contextmenu-middleware](https://github.com/parro-it/electron-contextmenu-middleware) - Build `electron` context menus composing multiple middlewares functions.\n\n* [electron-input-menu](https://github.com/parro-it/electron-input-menu) - Context menu for [electron](https://github.com/atom/electron) input elements.\n\n\n# License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 Andrea Parodi\n\n\n\n","funding_links":[],"categories":["Library","Tools"],"sub_categories":["Debug","For Electron"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Fdebug-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparro-it%2Fdebug-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparro-it%2Fdebug-menu/lists"}