diff --git a/lib/_debugger.js b/lib/_debugger.js index fb7b31a59a0..d544e41f541 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -351,10 +351,15 @@ function Interface() { }); term.on('line', function(cmd) { - // trim whitespace cmd = cmd.replace(/^\s*/, '').replace(/\s*$/, ''); - self.handleCommand(cmd); + + if (cmd.length) { + self._lastCommand = cmd; + self.handleCommand(cmd); + } else { + self.handleCommand(self._lastCommand); + } }); }