systemjs-debugger

0.0.6 • Public • Published

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;
});

Example output

Example output

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i systemjs-debugger

      Weekly Downloads

      0

      Version

      0.0.6

      License

      MIT

      Last publish

      Collaborators

      • peteruithoven