Log script commands to the browser console

This commit is contained in:
Jeff Parsons 2017-02-07 12:41:31 -08:00 committed by Jeff Parsons
commit 63c64843a7
2 changed files with 11 additions and 3 deletions

View file

@ -717,11 +717,21 @@ class Component {
static processCommands(idMachine, aaCommands, iCommand)
{
var fSuccess = true;
// var dbg = Component.getComponentByType("Debugger", idMachine);
while (iCommand < aaCommands.length) {
var aTokens = aaCommands[iCommand];
var sCommand = aTokens[0];
/*
* It's possible to route this output to the Debugger window with dbg.println()
* instead, but it's a bit too confusing mingling script output in a window that
* already mingles Debugger and machine output.
*/
Component.println('script: ' + aTokens.join(' '));
var fnCallReady = null;
if (Component.asyncCommands.indexOf(sCommand) >= 0) {
fnCallReady = function processNextCommand(iNextCommand) {