Multi Thread Debugging

  • Scott Duncan

    Scott Duncan - 2008-01-31

    I am trying to find out if there is any way that I can setup the debugger so that it will suspend all threads in an application when a breakpoint is hit, regardless of what thread the breakpoint is in.  Does anyone know if this is possible?

    • Fabio Zadrozny

      Fabio Zadrozny - 2008-01-31

      Not directly from the interface, but you can change the debugger...

      I think that you can change function: setSuspend()

      and add some code to suspend all threads... see, line 324 (at elif cmd_id == CMD_THREAD_SUSPEND:) and get that code to actually suspend all threads from the place setSuspend is called... just change

      "t = pydevd_findThreadById(text)"


      "for t in threading.enumerate():" to get all the threads instead of just that thread...

      I haven't tested it, but that should do the trick... Another option would be choosing all the threads in the interface and pressing the pause button for it after the breakpoint is hit... I'm not really sure what you want that for, but I hope some of those options can help you.



    • Scott Duncan

      Scott Duncan - 2008-02-04

      Great!  Thanks for your help.  The reason we need to do that is because in debugging our code, the other threads can change the state of things we may need to see in order to debug.  If all are paused, then we can control this better.  I will try this out and see if it works for us.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks