i am trying to listen to debug events through implementing the IDebugEventSetListener interface.
this is my implemention of the handleDebugEvent method:
@Override
public void handleDebugEvents(DebugEvent[] events) {
System.out.println("hello");
}
but for some reason after adding my class as debug event listner through the command:
DebugPlugin.getDefault().addDebugEventListener(class name);
for every debug event(like suspend,step into buttons,etc) the handleDebugEvent method is occuring more than one time, can someone explain to me why is this happening and or how to fix it?, thanks.

p.s
i am sorry if i posted in the wrong fourm, so if i did please direct me to the right one.

#handleDebugEvents is called one time for each set of debug events given to the notifier - see DebugPlugin$EventNotifier for more details.

Each event can have a kind and details, so it could appear that there are many events of the same kind (STEP_INTO for example) but they could all have different details.

Also there are some instances where a debug element can fire the same event kind with the same detail more than once. For example consider a RuntimeProcess, just by calling its setAttribute method will fire a CHANGED kind and UNSPECIFIED detail event each time.

Is this maybe what you are seeing? If not, could you paste a trace of the event kind / details you are seeing as duplicated?

That tells me that you got two resume and two suspend events. What were the details for the events? Could you run the trace again with a call to DebugEvent.toString() (it will print out the event kind and detail in plain english)?

Looks like it is working fine to me. You are getting a step into event for gdb/m1 (your debug target?) and another one for '1' (the thread?). Its important to note that each debug model element can send their own events at any time.

See the DebugElement#fire*Event methods for more information about sending your own events / finding where events get sent.