Problem
When working with Electron and VSCode, I've had a few syntax problems in code but no errors/warnings showed up in either VSCode's debug console or the Electron Chromium consoles.
With the Electron Chromium console, I have made sure that I enabled all levels, and Preserve log
.
Examples
The problems that gave NO console clues include
- With certain page script, Not
main.js
orrederer.js
, I didn't enablenodeIntegration
, so no NodeJS modules worked - Forgetting to add
let
/var
when defining variables, coming from other scripting worlds. - Forgetting to add
new
when creating objects. - An ES6 class constructor signature changed, e.g., more input args introduced, but the object creation code didn't change accordingly.
- Hitting an undefined object.
- When dealing with HTML strings with JS, there are errors in the HTML strings.
I feel a dire need to figure out a full list of "silent" problems that won't ever have any IDE/interpreter feedback during dev in the JS/NodeJS/Electron land. Otherwise, I would lose too much time on stupid errors.
Or am I missing anything obvious? Tool configuration, or simply misunderstanding of the problems?
Updates
I've discovered that main.js
or renderer.js
works with the debugger, but since I'm using a thirdparty lib electron-tabs
, not additional code linked to my electron-tab
's tab pages is supported by the debuggers. The above examples apply to those tab JS code. I don't know why yet, but at least this is a crucial detail.
Next, I'd love to know if adding more pages will make a difference.