Debugging the main process with Electron Forge


#1

Sorry in advance if this is the wrong place to post this. I was directed here by following links from https://github.com/electron-userland/electron-forge/blob/master/SUPPORT.md

I’m trying to figure out how to debug the main process with Chrome DevTools on an app being built and run by Electron Forge. More specifically, I want the functionality of node’s --inspect-brk flag. But all I can find is this page: https://v6.electronforge.io/debugging The only option there is --inspect-electron. I have tried --inspect-electron-brk and --inspect-brk-electron, but neither flag is recognized.

Is there a way for me to get the behavior of --inspect-brk with Electron Forge?

Thank you!


#2

I should clarify. I have Electron Forge 5.2.2. The docs I linked to previously are at v6.electronforge.com. But the --inspect-electron flag does seem to work, so I suppose it has been around since at least EF5.