diff --git a/packages/core/src/ground.js b/packages/core/src/ground.js index 93a8f07..4e5db5f 100644 --- a/packages/core/src/ground.js +++ b/packages/core/src/ground.js @@ -104,6 +104,12 @@ function bootModule(mod) { if (typeof document !== 'undefined') { document.addEventListener("DOMContentLoaded", (e) => { g.start(); }); } else { + process.on('SIGQUIT', () => { + console.log('---------------------------------------------------------------------------'); + console.log(g.index.root._debugString()); + console.log('ACTORS'); + g.actors.forEach((a) => console.log(' ' + a.toString())); + }); g.start(); } } diff --git a/packages/core/src/skeleton.js b/packages/core/src/skeleton.js index db33f71..bdadbcd 100644 --- a/packages/core/src/skeleton.js +++ b/packages/core/src/skeleton.js @@ -279,7 +279,7 @@ Index.prototype.sendMessage = function(v) { }); }; -Node.prototype._debugString = function () { +Node.prototype._debugString = function (outerIndent) { const pieces = []; const inspect = require('util').inspect; function line(indent, content) { @@ -325,8 +325,8 @@ Node.prototype._debugString = function () { walkCache(indent, h.cachedCaptures); line(indent, '' + h.callbacks.size + ' callback(s)'); } - line('', 'INDEX ROOT'); - walkNode('\n', this); + line(outerIndent || '', 'INDEX ROOT'); + walkNode(outerIndent || '\n', this); return pieces.join(''); };