Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

Electron/NodeJS/VSCode: What kind of syntax or infrastructure problems won't show in Debug Console?

$
0
0

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 or rederer.js, I didn't enable nodeIntegration, 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.


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>