See https://github.com/microsoft/debugpy/pull/308 Need to figure out how to properly do this in a non-UI test. `QThread` is in `QtCore`, so it should be doable.