How to use the electron-debug function in electron-debug

To help you get started, we’ve selected a few electron-debug examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ZeusWPI / MOZAIC / planetwars / client / app / main / extensions.ts View on Github external
export function installExtensions(): Promise {
  // TODO: Check use
  if (process.env.NODE_ENV === 'development') {
    const p = path.join(__dirname, '..', 'app', 'node_modules');
    // tslint:disable-next-line:no-var-requires
    require('module').globalPaths.push(p);
  }

  // Install electron debug
  // https://github.com/sindresorhus/electron-debug
  electronDebug({
    showDevTools: true,
    devToolsMode: 'previous',
  });

  // Install sourceMap support
  sourceMapSupport.install();
  log.debug("[STARTUP] Installed source map support");

  // Install react dev tools and redux devtools
  const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
  const react = installExtension(REACT_DEVELOPER_TOOLS, forceDownload)
    .then((name) => log.debug(`[STARTUP] ${name} installed`))
    .catch((err) => {
      log.error(err);
      log.error('[STARTUP] Failed to install React Dev Tools');
      throw err;

electron-debug

Adds useful debug features to your Electron app

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis