i am currently working on a simple javascript module system (similar to the node.js module system or requireJS).
To load javascript files that are required for a module i use the mootools request object:
var request = new Request({
url: <url to javascript file>,
method: 'get',
onSuccess: function(jsFileContent) {
var func = new Function(jsFileContent);
var result = func();
// ...
}
}).send();
The code works fine so far. My problem is that javascript files that are loaded this way don't show up in Firebug. So debugging of these files becomes hard because Firebug features like breakpoints cannot be used.
Is there any way to make this work with Firebug? Or is there any other way to load other javascript files from javascript that work fine with Firebug?
Thanks