Electron 0.33.6 not show log on console of Windows


#1

I install electron-prebuilt by the command below on Both Windows 10 and OS X,

npm install electron-prebuilt -g

I test my electron app on both Windows and OS X,the result is
Electron 0.33.6 on Windows not show log by calling console.log() in my code,
and Electron 0.33.6 on OS X shows the log.
Its a little strange …


#2

On Windows, run console.log(process.versions[‘electron’]) in the render process (i.e web page) to display this information in the devtool console window.


#3

I can see the logs of render process in devtool console window,
But I cannot see the logs of main process on Windows console where I run the command ‘electron ./’


#4

The main process doesn’t log errors to the devtools console, but to the terminal you started electron from.


#5

I think you need to pass the --enable-logging option in newer versions of Electron; but it looks like electron-prebuilt does not support it yet. I opened an issue for it:


#6

john, Thank U very much!
I tested on my electron 0.33.6 installed by command ‘npm install electron-prebuilt -g’ with the options --enable-logging, It works, I saw the logs of main process on Windows console!

En… The OSX version of Electron output logs to OS Console by default,
but The Windows version does not, I think It will be better if the behaviors on different platform keep same.