           cm.replaceRange s, {line: l, ch: 0}, {line: l, ch: cm.getLine(l).length}, 'D'
       return
     LN: -> # Toggle Line Numbers
-      v = !!if opts.debugger then prefs.lineNumbersInDebugger.toggle() else prefs.lineNumbersInEditor.toggle()
+      v = !!if isDebugger then prefs.lineNumbersInDebugger.toggle() else prefs.lineNumbersInEditor.toggle()
       cm.setOption 'lineNumbers', v; $tb.find('.tb-LN:visible').toggleClass 'pressed', v; return
     PV: -> search true; return # Previous
     NX: -> search(); return # Next

        cm.setCursor line: l, ch: 0
      return
    WI: opts.weakInterrupt
    ER: -> (if opts.debugger then emit 'RunCurrentLine', win: id else cm.execCommand 'newlineAndIndent'); return
    BH: -> emit 'ContinueTrace',  win: id; return # Run to exit (in tracer)
    RM: -> emit 'Continue',       win: id; return # Resume execution (in tracer)
    MA: -> emit 'RestartThreads', win: id; return # Resume all threads (in tracer)

  cm.dyalogCommands =
    ED: -> emit 'Edit', win: id, text: cm.getValue(), pos: cm.indexFromPos cm.getCursor(); return
    QT: -> emit 'CloseWindow', win: id; return
    BK: -> (if isDebugger then emit 'TraceBackward', win: id else cm.execCommand 'undo'); return # Backward or Undo
    FD: -> (if isDebugger then emit 'TraceForward', win: id else cm.execCommand 'redo'); return # Forward or Redo
    SC: -> $tb.find('.tb-search:visible').focus(); return # Search
    EP: -> # Exit (and save changes)
      v = cm.getValue()
