diff --git a/lib/narwhal/sandbox.js b/lib/narwhal/sandbox.js index e185aab..ef53383 100644 --- a/lib/narwhal/sandbox.js +++ b/lib/narwhal/sandbox.js @@ -29,9 +29,6 @@ exports.Sandbox = function (options) { if (!options) options = {}; - if (sandbox.debug) - SYSTEM.print("REQUIRE: id["+id+"] baseId["+baseId+"] pkg["+pkg+"] basePkg["+basePkg+"]"); - if (loader.resolvePkg) { var resolveInfo = loader.resolvePkg(id, baseId, pkg, basePkg); id = resolveInfo[0]; @@ -40,14 +37,11 @@ exports.Sandbox = function (options) { id = loader.resolve(id, baseId); } - if (sandbox.debug) - SYSTEM.print("USING: id["+id+"] pkg["+pkg+"]"); - /* populate memo with module instance */ if (!Object.prototype.hasOwnProperty.call(exportsMemo, id) || options.force || options.once) { if (sandbox.debug) - SYSTEM.print(new Array(++debugDepth + 1).join("\\") + " " + id, 'module'); + SYSTEM.print(new Array(++debugDepth + 1).join("\\") + " " + id); var globals = {}; if (sandbox.debug) { @@ -121,6 +115,9 @@ exports.Sandbox = function (options) { } } + if (sandbox.debug) + SYSTEM.print(factory.path); + if (sandbox.debug) { // check for new globals for (var name in global) @@ -129,7 +126,7 @@ exports.Sandbox = function (options) { } if (sandbox.debug) - SYSTEM.print(new Array(debugDepth-- + 1).join("/") + " " + id, 'module'); + SYSTEM.print(new Array(debugDepth-- + 1).join("/") + " " + id); // set fn.displayName on exported functions for better debugging if (setDisplayName) {