Consider this multi-threaded 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 with pdb, at the prompt I first set a break point at each of the two print statements. Then I continue. pdb breaks at print 'hola'
. I continue again and see the effect of the print in the other thread, but pdb doesn't break.
The help commands don't list anything to switch thread contexts like gdb... so... is it just not possible in one thread context to set a breakpoint that will trip in another context?