如果是疑问句,就说what were you dong?
如果在宾语从句中,因为宾语从句要求用陈述语序,所以就应说what you were doing
如 I don't know what you were doing.