debug server function