Consider this multithreaded program:
import threading class SomeThread(threading.Thread): def run(self): a = 1 print a def main(): print 'hola' someThread = SomeThread() someThread.start() if __name__ == '__main__': main()
When I debug this program using pdb, at the prompt I first set a breakpoint in each of the two print statements. Then I continue. pdb is split into print 'hola' . I continue again and see the print effect in another thread, but pdb will not break.
Help commands don't list anything for switching thread contexts like gdb ... so ... is it simply impossible to set a breakpoint in one thread context that will fire in another context?
python multithreading breakpoints pdb
dim fish
source share