Simple ground dataspace dump on SIGQUIT (Ctrl-\)
This commit is contained in:
parent
0eb9205a19
commit
f837aac390
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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('');
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue