added debug flag, for break points and stacktraces