systemjs-debugger
v0.0.6
Published
Debugger for SystemJS (JSPM) configurations
Downloads
2
Readme
SystemJS Debugger
Enables debugging SystemJS (JSPM) configuration.
After import it will keep a record of all imports and their information. You can log them in a readable way to a console using logImports()
. You can also visualize them in your own way by retrieving the imports data using getImports()
.
Usage
// import debugger first
System.import('systemjs-debugger').then(function(systemJSDebugger) {
// log imports when import succeeds or fails
systemJSDebugger.loggedImport('app.js')
});
Manually calling logImports()
// import debugger first
System.import('systemjs-debugger').then(function(systemJSDebugger) {
System.import('app.js')
.then(function() {
// log imports after import
systemJSDebugger.logImports();
window.onerror = null;
})
.catch(function(err) {
console.error(err);
// log imports on errors
systemJSDebugger.logImports();
});
// log imports on errors
window.onerror = systemJSDebugger.logImports;
});