When I'm in debug console for JS (during debug of a given source file), and I try to use a module that was imported in my source file, I get the following error:
Uncaught ReferenceError: myModule is not defined
It seems this will work for importing javascript modules for use in debugging console:
import myModule from '/path/to/module.js';
window.myModule = myModule;
// in the console:
myModule.foo();
(See this answer for more details...)
I want to be able to do this for all of the module imports in a given file, is this easily possible?
Psuedo-code:
for (i = 0; i < num_modules; i++) {
window[module.name] = modules[i];
}