问题
I'm developing a multithreaded client app using Delphi 2010 (using the excellent OmniThreadLibrary) and I'm having hard time with debugging since I'm constantly swapping from one thread to another.
I wonder if it's possible (using whatever tool or plugin, I don't care!) to find the current execution point, not just for the current thread, but for all the other threads as well.
A simplistic example/report:
Thread #1 stopped at line #5
Thread #2 stopped at line #25 (<-- breakpoint set here, causing Delphi to stop)
Thread #3 stopped at line #78
My goal is to "see" what the other threads are doing when Delphi stops at a certain breakpoint, not just using logs (or the not-so-helpful Thread 12345 stopped), but inspect them as if the breakpoint stopped at them.
I hope my question is clear enough, please note it's past midnight here so don't blame me if my question sounds stupid!
回答1:
If I'm understanding you correctly, you should be able to bring up the thread window while at a break-point (Ctrl-Alt-T) and then just double-click any thread to see where it's currently executing.
来源:https://stackoverflow.com/questions/9169152/execution-point-for-other-threads-in-delphi-2010