DevTools only show sources loaded with <script> tags


#1

This is probably a Chromium limitation. It seems devtools can only see sources that are loaded with script tags from HTML. Files that are “required” can’t be debugged, at least as far as I can see.

Example: index.html has a script tag to load main.js. In main.js there is a require(’./module’). Devtools sees index.html and main.js but not module.js.

Am I missing something obvious? Is there a way to debug required sources in a renderer process?

EDIT: It turns out I was missing something obvious. The required modules are in sources under “(no domain)”. I didn’t spot them at first because they’re buried with all the modules required from node_modules.