4

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!

menjaraz
  • 7,447
  • 4
  • 38
  • 79
TheDude
  • 2,815
  • 2
  • 41
  • 88

1 Answers1

6

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.

  • Thank you for the tip! But that brings me the CPU window with ASM code, what I'd like is to see the execution point (or nearest point at least) that corresponds to my pascal code – TheDude Feb 07 '12 at 00:58
  • 3
    Look in the call stack window. When you get the CPU window, it usually means that the thread is waiting in at the O/S level for some event to be signaled. – 500 - Internal Server Error Feb 07 '12 at 01:02
  • Yes, that's what I was looking for! Not exactly easy to find, but at least now I can see other threads info! I'd have upvoted your answer, but I still don't have those 15 reputation points :( Thank you very much! – TheDude Feb 07 '12 at 01:18