udapting the debug system