All Projects → electron-userland → Devtron

electron-userland / Devtron

Licence: mit
[LOOKING FOR MAINTAINERS] An Electron DevTools Extension

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to Devtron

Llum
Llum (light in catalan language) illuminates your Laravel projects speeding up your Github/Laravel development workflow
Stars: ✭ 107 (-93.8%)
Mutual labels:  devtools
Marionette
Selenium alternative for Crystal. Browser manipulation without the Java overhead.
Stars: ✭ 119 (-93.11%)
Mutual labels:  devtools
Works For Me
Collection of developer toolkits
Stars: ✭ 131 (-92.41%)
Mutual labels:  devtools
Parrot
✨ Scenario-based HTTP mocking
Stars: ✭ 109 (-93.68%)
Mutual labels:  devtools
Lastbackend
System for containerized apps management. From build to scaling.
Stars: ✭ 1,536 (-11.01%)
Mutual labels:  devtools
Service Worker Detector
This extension detects if a website registers a Service Worker.
Stars: ✭ 124 (-92.82%)
Mutual labels:  devtools
Rod
A Devtools driver for web automation and scraping
Stars: ✭ 1,392 (-19.35%)
Mutual labels:  devtools
Laravel Tinker Tools
Use short class names in an Artisan tinker session
Stars: ✭ 134 (-92.24%)
Mutual labels:  devtools
Reactide
Reactide is the first dedicated IDE for React web application development.
Stars: ✭ 10,318 (+497.8%)
Mutual labels:  devtools
Devtools Core
🚀 Packages for Firefox DevTools
Stars: ✭ 129 (-92.53%)
Mutual labels:  devtools
Flutter Debugger
Stars: ✭ 112 (-93.51%)
Mutual labels:  devtools
Termy
A terminal with autocomplete
Stars: ✭ 112 (-93.51%)
Mutual labels:  devtools
Ndb
ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools
Stars: ✭ 10,581 (+513.04%)
Mutual labels:  devtools
Hotel
🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
Stars: ✭ 9,736 (+464.08%)
Mutual labels:  devtools
Minimongoexplorer
Handy Google Chrome extension for reviewing MiniMongo.
Stars: ✭ 131 (-92.41%)
Mutual labels:  devtools
Devtools Ds
UI components, libraries, and templates for building robust devtools experiences.
Stars: ✭ 105 (-93.92%)
Mutual labels:  devtools
Network Plus
DevTools for network recording, modification and resending.
Stars: ✭ 122 (-92.93%)
Mutual labels:  devtools
Vscode Browse Lite
🚀 An embedded browser in VS Code
Stars: ✭ 134 (-92.24%)
Mutual labels:  devtools
Restore
A predictable & observable state container for React apps
Stars: ✭ 133 (-92.29%)
Mutual labels:  devtools
Check It Out
A command line interface for Git Checkout. See branches available for checkout.
Stars: ✭ 127 (-92.64%)
Mutual labels:  devtools

🚨 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].