Add setTrace method