Start listening on the given gRPC port.

    This method of an instance of InteractiveDebuggerPlugin can be invoked at
    most once. This method is not thread safe.

    Args:
      grpc_port: port number to listen at.

    Raises:
      ValueError: If this instance is already listening at a gRPC port.

def listen(self, grpc_port):
    """Start listening on the given gRPC port.

    This method of an instance of InteractiveDebuggerPlugin can be invoked at
    most once. This method is not thread safe.

    Args:
      grpc_port: port number to listen at.

    Raises:
      ValueError: If this instance is already listening at a gRPC port.
    """
    if self._grpc_port:
      raise ValueError(
          'This InteractiveDebuggerPlugin instance is already listening at '
          'gRPC port %d' % self._grpc_port)
    self._grpc_port = grpc_port

    sys.stderr.write('Creating InteractiveDebuggerPlugin at port %d\n' %
                     self._grpc_port)
    sys.stderr.flush()
    self._debugger_data_server = (
        interactive_debugger_server_lib.InteractiveDebuggerDataServer(
            self._grpc_port))

    self._server_thread = threading.Thread(
        target=self._debugger_data_server.run_server)
    self._server_thread.start()

    signal.signal(signal.SIGINT, self.signal_handler)