Attachment toAttachment() {
    StringBuilder sb = new StringBuilder();
    sb.append("myDebugId = ").append(myDebugId).append("\n");
    sb.append("myThread = ").append(myThread).append("\n");
    sb.append("Suspend policy = ").append(getSuspendPolicyString()).append("\n");
    sb.append("myEventSet = ").append(eventSetAsString()).append("\n");
    sb.append("myInProgress = ").append(myInProgress).append("\n");
    sb.append("myEvaluationContext = ").append(myEvaluationContext).append("\n");
    sb.append("myFrameCount = ").append(myFrameCount).append("\n");
    sb.append("myActiveExecutionStack = ").append(getStackStr()).append("\n");

    if (myResumedThreads != null && !myResumedThreads.isEmpty()) {
      sb.append("myResumedThreads:\n");
      for (ThreadReferenceProxyImpl thread : myResumedThreads) {
        sb.append("  ").append(thread).append("\n");
      }
    }

    if (!myNotExecutableThreads.isEmpty()) {
      sb.append("myNotExecutableThreads:\n");
      for (ThreadReferenceProxyImpl thread : myNotExecutableThreads) {
        sb.append("  ").append(thread).append("\n");
      }
    }

    sb.append("mySuspendAllSwitchedContext = ").append(mySuspendAllSwitchedContext).append("\n");
    sb.append("myIsCustomSuspendLogic = ").append(myIsCustomSuspendLogic).append("\n");
    sb.append("myPostponedCommands: ").append(myPostponedCommands.size()).append("\n");
    sb.append("myKeptReferences: ").append(myKeptReferences.size()).append("\n");
    sb.append("myIsVotedForResume = ").append(myIsVotedForResume).append("\n");
    sb.append("myVotesToVote = ").append(myVotesToVote).append("\n");
    sb.append("myIsResumed = ").append(myIsResumed).append("\n");
    sb.append("myIsGoingToResume = ").append(myIsGoingToResume).append("\n");
    return new Attachment("context " + this, sb.toString());
  }
Attachment toAttachment()