How to access variables from renderer process in the dev console in Electron?


#1

So I’m trying to use the console to debug some stuff in my application. For example, I have a variable declared in the JavaScript (index.js) that I’ve required from index.html called “song_table”. Normally, in a regular browser, if I were to type “song_table” into the console it would bring up the details on that variable…but that is not the case in Electron. I get an error saying that the variable is not defined, with this next to it: “VM135:1” or something similar. I know that that is meant to show which file the error is referencing and which line, but I don’t understand why the console is not referring to index.js. How can I debug from my “index.js” file?

Note: my main process is called “main.js”. “index.js” is just the script necessary on index.html.