private void suspendAndWait() throws DebuggerStoppedException {
    try {
      synchronized (theLock) {
        myCurrentStopCondition = null;

        myState = State.SUSPENDED;
        theLock.notifyAll();

        do {
          theLock.wait();
        }
        while (myState == State.SUSPENDED);

        if (myState == State.STOPPED) {
          throw new DebuggerStoppedException();
        }
      }
    } catch (InterruptedException e) {
      throw new DebuggerStoppedException();
    }
  }
private void suspendAndWait()