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') {
|
if (typeof document !== 'undefined') {
|
||||||
document.addEventListener("DOMContentLoaded", (e) => { g.start(); });
|
document.addEventListener("DOMContentLoaded", (e) => { g.start(); });
|
||||||
} else {
|
} 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();
|
g.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,7 +279,7 @@ Index.prototype.sendMessage = function(v) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Node.prototype._debugString = function () {
|
Node.prototype._debugString = function (outerIndent) {
|
||||||
const pieces = [];
|
const pieces = [];
|
||||||
const inspect = require('util').inspect;
|
const inspect = require('util').inspect;
|
||||||
function line(indent, content) {
|
function line(indent, content) {
|
||||||
|
@ -325,8 +325,8 @@ Node.prototype._debugString = function () {
|
||||||
walkCache(indent, h.cachedCaptures);
|
walkCache(indent, h.cachedCaptures);
|
||||||
line(indent, '' + h.callbacks.size + ' callback(s)');
|
line(indent, '' + h.callbacks.size + ' callback(s)');
|
||||||
}
|
}
|
||||||
line('', 'INDEX ROOT');
|
line(outerIndent || '', 'INDEX ROOT');
|
||||||
walkNode('\n', this);
|
walkNode(outerIndent || '\n', this);
|
||||||
return pieces.join('');
|
return pieces.join('');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue