Dev Tools on a Production Electron Build

I was having issues with production builds of an electron app, and being an electron noob I spent far too much time trying to figure out how to get the chrome dev tools to show up on a production build. There are a lot of answers to this question out there, but not many of them actually work. Here's one way to do it.

In your main renderer file (usually named main.js) you can simply call the toggleDevTools function on the current window. That might look something like this:

require('electron').remote.getCurrentWindow().toggleDevTools()

Of course, you can map this to a function/click/action/etc. but this will get it to show up after app launch.
Hopefully this helps someone out there. 👍