dubugging in process, rewrite simple and discrete environments