Discussion:
Notification for debugger step
(too old to reply)
AlexB
2008-03-24 06:25:03 UTC
Permalink
Hi all.

D2007.

What is the proper way to get notification for debugger step (F7/F8)?
What notifier should I use to trap the right notification
when the process is stopped and goes into debug mode?
Try IOTAThreadNotifier.ThreadNotify.
but I have no idea where and how I can install that notifier.

TIA.
--
Alex
Erik Berry
2008-05-29 07:32:22 UTC
Permalink
Post by AlexB
Try IOTAThreadNotifier.ThreadNotify.
but I have no idea where and how I can install that notifier.
You have to call IOTAThread50.AddNotifier. You can get the IOTAThread
interface using a process notifier and watching for ThreadCreated:

IOTAProcessNotifier = interface(IOTANotifier)
['{34B2E2D6-E36F-11D1-AB0E-00C04FB16FB3}']
{ Called when a Thread is created }
procedure ThreadCreated(const Thread: IOTAThread);
{ Called when a Thread is Destroyed }
procedure ThreadDestroyed(const Thread: IOTAThread);
{ Called when a Process module is added }
procedure ProcessModuleCreated(const ProcessModule: IOTAProcessModule);
{ Called when a Process module is deleted }
procedure ProcessModuleDestroyed(const ProcessModule: IOTAProcessModule);
end;

Or try IOTAProcess60.GetCurrentThread, etc.

You need to walk your way back until you get to a base interface like
IOTADebuggerServices that is supported by the BorlandIDEServices global
variable. You may also have some luck searching the web/newsgroups for
sample code using IOTAThreadNotifier.

Erik
AlexB
2008-05-29 10:15:29 UTC
Permalink
You have to call IOTAThread50.AddNotifier. You can get the
IOTAThread interface using a process notifier and watching for
ThreadCreated
OK, it's clear now.

Since then I asked I've changed my mind and decided don't respond to
every debugger step.

Thank you anyway.
--
Alex
Loading...