Right now it's hard for debuggers to set the tracing function to be used for running threads.
This would be really handy for debuggers when attaching to a running program to debug all threads.
-- Note: currently there is a way to achieve that by pausing all the threads then selectively switching to a thread to make it current and setting the tracing function using the C-API (see: https://github.com/fabioz/PyDev.Debugger/blob/master/pydevd_attach_to_process/dll/attach.cpp#L1224), but I believe this is very hacky and not portable to other Python implementations. |