That was one of the initial reasons for this PR. While having a debugger attached, access to DWT may have been disabled between the last call to CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk and access to DWT. Adding it everywhere just reduces the probability dramatically.