code: private void setupDebugger(Debugger debugger) {
          if (debugger == null) {
              return;
          }
  
          this.debugger = debugger;
          JSObject globalObject = getGlobalContext().getObject();
          String debuggerName = getRuntime().getConfig().getExposeDebugAs();
          Object currentDebugger = globalObject.get(this, debuggerName);
          if (!(currentDebugger instanceof DebuggerAPI)) {
              DebuggerAPI api = new DebuggerAPI(getGlobalContext(), debugger);
              globalObject.put(this, debuggerName, api, false);
          }
      }
docs: ----------------------------------------------------------------------