Git Product home page Git Product logo

devtron's Introduction

🚨 WARNING: Devtron is currently unmaintained. If you're interested in becoming a maintainer, see Issue #200 for more information.

Devtron icon Devtron

An Electron DevTools extension to help you inspect, monitor, and debug your app.

Travis Build Status AppVeyor Build status js-standard-style downloads:?

screenshot

Features

  • Require graph to help you visualize your app's internal and external library dependencies in both the main and renderer processes.
  • IPC monitor to track and inspect the messages sent and received between the renderer and main processes in your app.
  • Event inspector that shows the events and listeners that are registered in your app on the core Electron APIs such as the window, the app, and the processes.
  • App Linter that checks your apps for possible issues and missing functionality.

Installing

npm install --save-dev devtron

Then execute the following from the Console tab of your running Electron app's developer tools:

require('devtron').install()

You should then see a Devtron tab added.

Disabled Node Integration

If your application's BrowserWindow was created with nodeIntegration set to false then you will need to expose some globals via a preload script to allow Devtron access to Electron APIs:

window.__devtron = {require: require, process: process}

Then restart your application and Devtron should successfully load. You may want to guard this assignment with a if (process.env.NODE_ENV === 'development') check to ensure these variables aren't exposed in production.

Developing locally

git clone https://github.com/electron/devtron
cd devtron
npm install
npm start

This will start a process that watches and compiles the extension as files are modified.

Then open the Console tab of your Electron app and run the following with the path updated for the location that you've cloned devtron to:

require('/Users/me/code/devtron').install()

Then a Devtron tab should appear and it will now be enabled for that application.

You can reload the extension by closing and reopening the dev tools.

Running in a browser

To make developing and debugging the extension easier, you can run it in a Chrome tab that will talk remotely to a running Electron app over HTTP.

  • Set the DEVTRON_DEBUG_PATH environment variable to the path of the cloned devtron repository.

  • Start your Electron application.

  • Click the Devtron tab.

  • You should then see the following messages logged to the Console tab:

    Devtron server listening on http://localhost:3948

    Open file:///Users/me/devtron/static/index.html to view

  • Then open /Users/me/devtron/static/index.html in Chrome

  • The page there will talk remotely to the running Electron app so you'll be able to fully interact with each pane with real data.

Additional Notes

  • require('devtron').install() cannot be called before the ready event of the app module has been emitted.

Webpack

When using webpack, you may experience issues resolving __dirname. In accordance with the docs, __dirname is resolved at runtime on the compiled file.

You have to two solutions:

  1. Remove devtron from Webpack bundle with config.externals
  2. Copy devtron files to the same folder as your compiled main process file

[Solution 1] Remove from webpack bundle

config.externals = [
  function(context, request, callback) {
    if (request.match(/devtron/)) {
      return callback(null, 'commonjs ' + request)
    }

    callback()
  }
]

[Solution 2] Copy devtron files

  1. Make sure that webpack does not replace __dirname by setting:
// in your webpack config for main process
{
  target: 'electron-main',
  node: {
    __dirname: false,
  }
}
  1. Ensure that the copy target for devtron/manifest.json is the same folder as your compiled main process js file.
  2. 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.

You can copy files with copy-webpack-plugin.

const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');

const copyFiles = [
  {
    from: path.resolve(__dirname, 'node_modules/devtron/manifest.json')
  }, 
  {
    from: path.resolve(__dirname, 'node_modules/devtron/out/browser-globals.js'),
    to: path.resolve(__dirname, 'out'),
  }
];

config.target = 'electron-main',
config.plugins = [
  new CopyWebpackPlugin(copyFiles),
]

Contributing

Have an idea for something this extension could do to make debugging Electron apps easier? Please open an issue.

Pull requests are also welcome and appreciated. Run npm test to run the existing tests. This project uses the standard JavaScript style.

License

MIT

devtron's People

Contributors

binarymuse avatar codebytere avatar erickzhao avatar furiouzz avatar jlord avatar kevinsawicki avatar marshallofsound avatar philschatz avatar princejwesley avatar rafaelstz avatar simurai avatar sindresorhus avatar stevekinney avatar zeke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devtron's Issues

Add work-around (in README) for when require('devtron').install() does not resolve in devtools

When running the quickstart example, everything works.

When using a setup similar to the one in this blog post, i.e. serving HTML through Webpack dev server, the 'devtron' module is not resolvable for me from renderer's process's Console (I can resolve it from main process's REPL when running electron with --interactive).

To get around this, since it works from the main process, one can add: require('devtron').install() in the main process's file, run it once and then remove it.

Is this worth documenting in README.md?

Handle reload of window

Currently if the window reloads, devtron does not refresh or rebuild the displayed information.

Add warnings section

Shows you warnings about things your app isn't doing but should do:

  • Listening for crashed events
  • Listening for unresponsive events
  • Listening for uncaughtException events in main process
  • Using asar
  • Using the latest Electron version
  • Others?

No IPC events being shown; IPC chrome tools crashing

"electron": "^2.0.3",

console errors:

[5968:0626/095527.874:ERROR:CONSOLE(4799)] "Cannot find context with specified id", source: chrome-devtools://devtoo
undled/inspector.js (4799)
[5968:0626/095527.874:ERROR:CONSOLE(7574)] "Extension server error: Inspector protocol error: Cannot find context wi
pecified id", source: chrome-devtools://devtools/bundled/inspector.js (7574)
[5968:0626/095527.878:ERROR:CONSOLE(1076)] "Getting IPC events failed", source: chrome-extension://devtron/out/index
(1076)
[5968:0626/095527.878:ERROR:CONSOLE(1077)] "[object Object]", source: chrome-extension://devtron/out/index.js (1077)

// public/electron.js

const { app, BrowserWindow, ipcMain } = require('electron');
const isDev = require('electron-is-dev');

function createWindow() {
  mainWindow = new BrowserWindow({width: 900, height: 680});
  mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`);
  mainWindow.on('closed', () => mainWindow = null);

  if (isDev) {
    // dev tools
    require('devtron').install(); // load devtron
    mainWindow.webContents.openDevTools(); // load chrome dev tools
  }
}

...

let onlineStatus;

// track online/offline status
ipcMain.on('online-status-changed', (event, status) => {
  console.log(status);
  onlineStatus = status;
});

// public/online.js <- loaded via script tag in index.html

const { ipcRenderer } = require('electron');
let onlineStatus = navigator.onLine;

const updateOnlineStatus = () => {
  onlineStatus = navigator.onLine ? 'online' : 'offline';
  ipcRenderer.send('online-status-changed', onlineStatus);
}

window.addEventListener('online',  updateOnlineStatus);
window.addEventListener('offline',  updateOnlineStatus);

updateOnlineStatus();

I can see the console messages being sent back and forth between processes.

strange requirejs mismtach error

Hi,
I have this very strange issue where when I start electron via npm run start
I get this error in console. see below.

  1. This error does not break anything as requirejs and application still works fine
  2. This only happens on my laptop. I tested same source on different machines, this error does not come on other machines.
  3. If i compile my code and open gui via forcing developer mode to look at console , this error is not there (on same laptop)
  4. I have tried clearing , caches, uninstalling and installing node.js and node modules again from scratch but it is still there.

my HTML :

  <body >
 
    <script>
      if (window && window.process && window.process.versions['electron']) {
        // is running inside electron not in web-browser
        // 
        // http://electron.atom.io/docs/faq/#i-can-not-use-jqueryrequirejsmeteorangularjs-in-electron
        // move window.module, window.require inserted in DOM becuase of electron-node integration
        // 
        window.nodeRequire = window.require;
        window.nodeExports = window.exports;
        window.nodeModule = window.module;
        delete window.exports;
        delete window.module;
      }
      window.require = {
        waitSeconds: 0,
        urlArgs: 'bust=' + (new Date()).getTime()
      };
    </script>
    <script src="./js/requirejs/require.js"></script>
 
  </body>

ERROR:

require.js:168 Uncaught Error: Mismatched anonymous define() module: function () {
  var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.isDef = function(a) {
  return void 0 !== a;
};
goog.exportPath_ = function(a, b, c) {
  a = a.split(".");
  c = c || goog.global;
  a[0] in c || !c.execScript || c.execScript("var " + a[0]);
  for (var d;a.length && (d = a.shift());) {
    !a.length && goog.isDef(b) ? c[d] = b : c = c[d] ? c[d] : c[d] = {};
  }
};
goog.define = function(a, b) {
  var c = b;
  COMPILED || (goog.global.CLOSURE_UNCOMPILED_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES, a) ? c = goog.global.CLOSURE_UNCOMPILED_DEFINES[a] : goog.global.CLOSURE_DEFINES && Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES, a) && (c = goog.global.CLOSURE_DEFINES[a]));
  goog.exportPath_(a, c);
};
goog.DEBUG = !0;
goog.LOCALE = "en";
goog.TRUSTED_SITE = !0;
goog.STRICT_MODE_COMPATIBLE = !1;
goog.DISALLOW_TEST_ONLY_CODE = COMPILED && !goog.DEBUG;
goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1;
goog.provide = function(a) {
  if (goog.isInModuleLoader_()) {
    throw Error("goog.provide can not be used within a goog.module.");
  }
  if (!COMPILED && goog.isProvided_(a)) {
    throw Error('Namespace "' + a + '" already declared.');
  }
  goog.constructNamespace_(a);
};

Error is very long so i am just pasting few lines above.

"Listen for crash events" warning showing, not correct?

Hey! Devtron is awesome, but it's giving this warning in the Lint panel:

image

However, we do have a listener attached https://github.com/nylas/N1/blob/master/src/browser/nylas-window.coffee#L198, and I can verify that it's working properly by force-emitting a crashed event from the dev tools console within the window:

remote.getCurrentWebContents().emit('crashed')

Maybe it's not picking it up because the listener is in the main process and not within the renderer process?

Event Listeners and IPC no outputs

  • Electron version: v1.1.3
  • Operating system: Linux Mint 17.1
  • Node version: v4.4.7
  • Devtron version: v1.2.1

With electron v1.1.3, Event listeners and IPC window do not display any output (after clicking load listeners). However, tried with electron version 1.2.7 and 1.0.1, there are outputs for the Event listeners. IPC remains empty.

This is how devtron is installed and uninstalled via the Main.js:

// Module to control application life.
const app = require('electron').app;
// Module to create browser window.
const BrowserWindow = require('electron').BrowserWindow;
// Module to extract application pathname. 
/*
const cwd = process.cwd();
*/
const cwd = require('electron').app.getAppPath();

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
var mainWindow = null;

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', function() {
    // Create the browser window.
  mainWindow = new BrowserWindow({width: 1400, height: 800});
  // and load the index.html of the app.
  // mainWindow.loadURL('file://' + __dirname + '/Index.html');
  mainWindow.loadURL('file://' + cwd + '/Index.html');
    // Open the DevTools.
  mainWindow.webContents.openDevTools();
require('devtron').install();
  // Emitted when the window is closed.
  mainWindow.on('closed', function () {
    // Dereference the window object, usually you would store windows
    // in an array if your app supports multi windows, this is the time
    // when you should delete the corresponding element.
    mainWindow = null;
  });
});

// Quit when all windows are closed.
app.on('window-all-closed', function () {
  require('devtron').uninstall();
  // On OS X it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform !== 'darwin') {
    app.quit();
  }
});

app.on('activate', function () {
  // On OS X it's common to re-create a window in the app when the
  // dock icon is clicked and there are no other windows open.
  if (mainWindow === null) {
    app.createWindow();
  }
});

`shasum check failed` on `npm install`

npm i devtron fails on Windows 7.

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v-x64\\6.9.1\\node.exe" "C:\\Pro
gram Files (x86)\\Nodist\\npmv\\3.10.9\\bin\\npm-cli.js" "i"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.9

npm ERR! shasum check failed for C:\Users\Waltem7\AppData\Local\Temp\npm-9204-634bd942\registry.npmjs.org\accessibility-developer-tools\-\accessibility-developer-tools-2.11.0.tgz
npm ERR! Expected: 2b669c802671672aed5c61c42a782082a2fc7d2c
npm ERR! Actual:   49770660ef11e155526eb2edfc9861b38247a78a
npm ERR! From:     https://registry.npmjs.org/accessibility-developer-tools/-/ac
cessibility-developer-tools-2.11.0.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

Remote Debugging - DEVTRON_DEBUG_PATH

For remote debugging, this was mentioned:

Set the DEVTRON_DEBUG_PATH environment variable to the path of the cloned devtron repository.

As I am new to environment variable, could you please show me exactly how to incorporate "DEVTRON_DEBUG_PATH" into the Command-Line Interface or Main.js (the starting JS file for Electron)?

Thank you for your help.

Only show in tab the first time install devtron

The DevTron tab only show up on the first time require('devtron').install(). When you close the devtools, and open it again, you'll find the tab gone, and even if you recall the install() it will not appear.

Odd rows of LINT panel disappear on mousedown.

This appear to be a CSS issue. Even rows when clicked apperar with a blue background, while odd ones appear with a white background and a white foreground, making the text disappear.

Own src modules not listed in require graph

Apparently, only requires from node_modules are listed in the require graph. Your "own" modules from e.g. the src directory are not shown.

I use require('devtron').install(); and the devtron tab loads just fine in devtools, but my own modules / files are not there:

image

I am using electron-webpack, so there is an entire webpack setup hidden, may that be the cause?`
Or, is this just how devtron works and everything is normal here?

I would very much appreciate a require graph of own modules, especially in large-ish codebases.

Crash when used with BroswerWindow webPreferences partition or session

I am seeing a crash on OS X 10.11.5 when using devtron and certain BrowserWindow config. To reproduce:

git clone https://github.com/electron/electron-quick-start
cd electron-quick-start
npm install --save-dev devtron

Change the browser window config in main.js to be:

  mainWindow = new BrowserWindow({
    width: 800, height: 600,
    webPreferences: {
        partition: 'persist:main'
    }
  })

Run the app

npm install && npm start

Open dev tools and start devtron

require('devtron').install()

Crash. Same thing occurs when passing a session to the webPreferences.

This can also be reproduced by adding webPreferences session persistence on an existing app that loads devtron in devtools.

Ensure tables scroll correctly

Currently the require graph scrolls correctly but events and ipc scroll the header bar as well which shouldn't happen.

license

Would it be possible to add the normal MIT electron license as a LICENSE file?

It would be nice for automated discovery of licensing when walking a node_modules dir for automatic generation of licenses.

Add tooltips

Probably a bunch of places where title attributes would be helpful for people.

Support apps with disabled node integration

Currently this extension does not work if nodeIntegration is set to false for the current BrowserWindow.

Add a custom message with instructions about how to use a preload script to expose the needed helpers to devtron so it can work properly in this configuration.

RangeError: Maximum call stack size exceeded, electron v2.0 + devtron v1.4

Symptom

When I try to use devtron v1.4 (latest) with electron 2.0 and click Load Graph, I met errors.

Tested

Also, I tested it with official page's quick start app.

Screen shot

image

image

image

Fine condition

It works fine with devtron v1.4 and electron v1.8.x

Full Error Log

[8530:0508/153704.861660:ERROR:CONSOLE(1622)] "RangeError: Maximum call stack size exceeded
    at JSON.parse (<anonymous>)
    at EventEmitter.ipcRenderer.sendSync (/Users/doortts/repos/electron-quick-start/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/api/ipc-renderer.js:14:15)
    at Object.descriptor.get [as children] (/Users/doortts/repos/electron-quick-start/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:131:34)
    at walkModule (<anonymous>:21:26)
    at Array.map (<anonymous>)
    at walkModule (<anonymous>:21:35)
    at Array.map (<anonymous>)
    at walkModule (<anonymous>:21:35)
    at Array.map (<anonymous>)
    at walkModule (<anonymous>:21:35)", source: chrome-extension://devtron/out/index.js (1622)

Not loading

I am unable to use devtron, only a blank page appears. and in the Terminal it shows
[15462:1022/132742:ERROR:CONSOLE(206)] "Uncaught SyntaxError: Unexpected token {", source: chrome-extension://extension-1/out/index.js (206)

Devtron doesn't install when the --enable-mixed-sandbox flag is set

It looks like devtron doesn't install correctly when the app is launched with the --enable-mixed-sandbox flag. Is that expected?

Here's a portion of the launch.json:

"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/src/main/main.js",
"sourceMaps": true,
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd",
"runtimeArgs": [
     "--enable-mixed-sandbox",
     "."
],
"preLaunchTask": "build",
"env": {
     "NODE_ENV": "unpackaged"
},
"args": [],
"protocol": "inspector"

When starting the app and running require("devtron").install(), I get this output, and no devtron tab is added.

devtron_fail

Gamepad API stops reporting if position 0 is unplugged

With the following code:

window.setInterval(() => { console.log(navigator.getGamepads()); }, 500);

You will get a list of all available gamepads. However, if you run this in electron with two controllers attached, then remove the first controller listed, the second controller is also removed from the array.

Adding back the first controller adds both the first and second controller again.

If you run this code in chrome, unplugging player one does not disconnect player two.

Link to electron docs

Probably a couple places where linking to the electron docs could be helpful for people.

Switch panes via keybindings

Probably use alt-up and alt-down to switch the active pane similar to switching channels keybinding in Slack.

Leaving webviewer

Hi there,

I clicked on a documentation link provided by the devtron linter and got the information displayed as a website. But now comes the tricky part: How to leave the webview to have the devtron tools available again? There is no back or close button, neither the usual browser commands for history back work.

Do I have to restart the application every time I click a link?! O.o

Best wishes.

bildschirmfoto 2016-12-22 um 16 16 15

Add filter by channel in IPC panel

"Hide internal button" is useful, but it will be useful if we can filter events by channel name, something similar to the filter feature in console panel.

Getting event listeners failed

I'm not sure if this is because I'm using electron-prebuilt or if something else is going on but I'm getting the following error in the main process when clicking 'Load Listeners':

[54624:0526/100818:ERROR:CONSOLE(413)] "Getting event listeners failed", source: chrome-extension://extension-1/out/index.js (413)
[54624:0526/100818:ERROR:CONSOLE(414)] "Error: value.hasOwnProperty is not a function
TypeError: value.hasOwnProperty is not a function
    at valueToMeta (/Users/dave/code/forks/electron-react-boilerplate/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:70:22)
    at EventEmitter.<anonymous> (/Users/dave/code/forks/electron-react-boilerplate/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:320:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)
    at EventEmitter.<anonymous> (/Users/dave/code/forks/electron-react-boilerplate/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:139:25)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:191:7)
    at valueToMeta (/Users/dave/code/forks/electron-react-boilerplate/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:70:22)
    at EventEmitter.<anonymous> (/Users/dave/code/forks/electron-react-boilerplate/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:320:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)
    at EventEmitter.<anonymous> (/Users/dave/code/forks/electron-react-boilerplate/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:139:25)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:191:7)
    at metaToValue (/Users/dave/code/forks/electron-react-boilerplate/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:178:13)
    at descriptor.get [as _events] (/Users/dave/code/forks/electron-react-boilerplate/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/renderer/api/remote.js:127:16)
    at getEvents (<anonymous>:23:26)
    at <anonymous>:37:45
    at <anonymous>:45:5
    at <anonymous>:49:9
    at Object.InjectedScript._evaluateOn (<anonymous>:145:167)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:137:25)
    at Object.InjectedScript.evaluate (<anonymous>:118:14)", source: chrome-extension://extension-1/out/index.js (414)

Lint is not returning the correct electron version number

When linting an existing App. Electron's current version is grabbed from https://atom.io/download/atom-shell/index.json.

From the JSON array, the first element is returned which must not be the recent version. Currently it's treating 1.3.7 as the current version because it's the first element in the array. Version 1.4.1 is the second one in the array.

So the lint-helpers should pay respect to the version property of each release listed in the array/

Fill in README

  • How to contribute
  • What frameworks does this project use
  • Descriptions of the features
  • Better instructions on installing into an app

Event Listeners and IPC no outputs

New to programming electron and devtron

Environment

  • Operating system: Linux Mint 17.1
  • Node: v4.4.7
  • Electron: v1.1.3
  • Devtron: v1.2.1

Issue

Tried Devtron with electron v1.1.3, there are no outputs for Event Listeners and IPC. Oddly, tried with electron v1.2.7 and v1.0.1, there are outputs for the Event Listeners but IPC still remains empty. Below are the outputs of Require Graph, Event listeners and IPC for the three electron versions.

Electron v1.1.3 Outputs

  • Main process => 1-line output
  • Render Process => Output is normal
  • Event Listeners => Zero output
  • IPC => Zero output

Electron v1.0.1 Outputs

  • Main process => 1-line output
  • Render Process => Output is normal
  • Event Listeners => Output is normal
  • IPC => Zero output

Electron v1.2.7 Outputs

  • Main process => 1-line output
  • Render Process => Output is normal
  • Event Listeners => Output is normal
  • IPC => Zero output

Would greatly appreciate if someone could point the steps in resolving this issue. Thanks!

Main.js

This is how devtron is installed and uninstalled via the Main.js:

const app = require('electron').app;
const BrowserWindow = require('electron').BrowserWindow;
const cwd = require('electron').app.getAppPath();

var mainWindow = null;

app.on('ready', function() {
  require('devtron').install();

  mainWindow = new BrowserWindow({width: 1400, height: 800});
  mainWindow.loadURL('file://' + cwd + '/Index.html');
  mainWindow.webContents.openDevTools();

  mainWindow.on('closed', function () {
    mainWindow = null;
  });
});

app.on('window-all-closed', function () {
  require('devtron').uninstall();

  if (process.platform !== 'darwin') {
    app.quit();
  }
});

app.on('activate', function () {
  if (mainWindow === null) {
    app.createWindow();
  }
});

npm install fails

❯ npm i
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

> [email protected] install /Users/zeke/electron/devtron/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/zeke/electron/devtron/node_modules/fsevents/lib/binding/Release/node-v47-darwin-x64/fse.node" is installed via remote

> [email protected] install /Users/zeke/electron/devtron
> browserify lib/*.js -o out/index.js --ignore-missing --entry lib/index.js

events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open 'out/index.js'
    at Error (native)

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v5.8.0
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `browserify lib/*.js -o out/index.js --ignore-missing --entry lib/index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'browserify lib/*.js -o out/index.js --ignore-missing --entry lib/index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the devtron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     browserify lib/*.js -o out/index.js --ignore-missing --entry lib/index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs devtron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls devtron
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/zeke/electron/devtron/npm-debug.log

~/electron/devtron move-to-electron-org
❯ node -v
v5.8.0

~/electron/devtron move-to-electron-org
❯ npm -v
3.7.3

CORS issue with https://atom.io/download/atom-shell/index.json

My app is spawning a local http server, and the renderer is simply fetching http://127.0.0.1:8036.
I have this CORS error when using devtron. Is there anything we can do about it? Either you or me 😉?

Fetch API cannot load https://atom.io/download/atom-shell/index.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8036' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Add CI

Setup Travis once this repo is public

Does not run when devtools are undocked

Hi
We've updated our electron app to 1.0.1, and npm installed devtron.

However the tab does not appear when running require('devtron').install() in the console.

Any ideas what we can check?

Thanks

Simon

Add API to install

Make installation as easy as running require('devtron').install() from the dev tools.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.