UNPKG

trepanjs

Version:

A gdb-like debugger for nodejs. It is in the style of the trepanning debuggers.

30 lines (27 loc) 660 B
"use strict"; /*================================= Debugger 'display' command ===================================*/ function Init(intf, Interface) { intf.defineCommand('display', { help: "**display**(['*exp*'])\n\ \n\ Print value of expression *exp* each time the program stops.\n\ With no argument, evaluate and display all currently-requested\n\ expressions\n\ \n\ See also:\n\ ---------\n\ `undisplay`", run: function(expr) { if (expr) { intf._displays.push(expr); } else if (intf._displays.length == 0) { intf.error("There are no displays currently set."); return; } intf.displays(); } }); } exports.Init = Init;