code: public synchronized void setState(DebugState newState)
  	{
  		if (!states.contains(newState))
  		{
  			switch (newState)
  			{
  				case Disconnected:
  					Assert.isLegal(canChange(DebugState.Disconnected), "Cannot disconnect a terminated state");
  				case Terminated:
  					Assert.isLegal(canChange(DebugState.Terminated), "Cannot terminate a terminated state");
  					states.clear();
  					states.add(newState);
  					break;
  				case Suspended:
  					Assert.isLegal(canChange(DebugState.Suspended), "Can only suspend if resumed");
  					states.remove(DebugState.Resumed);
  					states.add(newState);
  					break;
  				case IsStepping:
  					Assert.isLegal(canChange(DebugState.IsStepping), "Cannot step if not suspended");
  					states.add(newState);
  					break;
  				case Resumed:
  					Assert.isLegal(canChange(DebugState.Resumed), "Cannot resume in a terminated state");
  					if (states.contains(DebugState.IsStepping))
  					{
  						states.clear();
  						states.add(DebugState.IsStepping);
  					} else
  					{
  						states.clear();
  					}
  					states.add(newState);
  					break;
  				case Deadlocked:
  					states.add(newState);
  					break;
  			}
  		}
  	}
docs: Sets a new state, an Assert.IsLegal is asserted if the given state is not valid based on the current state
  
  @param newState
  the new state to change into