Maybe I am misunderstanding, but you can just do ctrl + shift + I to pull up dev tools.
Or alternatively if you are wanting to do it programmatically, the way I do it is include the following lines in my main.js
file that is passed to electron.
var app = require('app');
var BrowserWindows = require('browser-window');
app.on('ready', function(){
mainWindow = new BrowserWindow({width:800, height:600});
mainWindow.webContents.openDevTools();
}
I believe part of your problem may be that you aren’t waiting for the app to be ready before you try to do stuff with it.