implemented a boolean flag to signal if debugger is running or not