The vulgar questions a man asked before he stabbed his “best friend” over his relationship with his ex-girlfriend have been revealed in court.