Console.log() isn't the only Javascript debug tool. Visual Studio Code has great features to track bugs. Use VS Code's debugging feature for Javascript.
Electron allows you to create desktop apps using Node.js. These apps usually have a single window, but here's how to support multiple windows in Electron.