Greetings wise brothers.
I have been asked to do some maintenance on a perl program that makes substantial use of threads. I have attempted to debug it using the perl command line debugger, and I am finding the process difficult because more than one thread is active at once and they are not separate. If there are multiple breakpoints active, and multiple threads that could hit then I find that while stepping over code, my next prompt could at any time be in a different thread from the one I was debugging a moment before.
I know the obvious suggestion is to turn of the multi threading, but the design of the program is such that to do so would be a substantial undertaking, and I don't want to risk breaking parts of the program that I don't need to.
In the past when debugging perl programs that make use of multiple processes via fork(), I have been able to keep the processes separate by running the debug session under linux in an xterm window, then if a child process hits a breakpoint, then another xterm window is created for that process so I can debug it separately from the parent and any other children.
Is there a similar technique for debugging Perl that uses threads? Any other tips?