Events wont Debug in the RT

Events wont Debug in the RT

Hello,
I have an issue with the debugging of an event.
My code works without error and the event works too when I start the runtime and the event happens.
When I start the debug session in the Runtime, the events wont run anymore.
When I start the debug session directly from the VSTA IDE from the Editor, then the event work while debugging.
My code:
C# Code:
private void ThisProject_Startup(object sender, EventArgs e {
this.Active += new zenOn.ActiveEventHandler(ThisProject_Active);
this.Inactive += new zenOn.InactiveEventHandler(ThisProject_Inactive);
}
void ThisProject_Active() {
//Initialize AlarmListSelectionChanged Change Event
this.Alarm().AlarmListSelectionChanged += new zenOn.AlarmListSelectionChangedEventHandler(zAML_AlarmListSelectionChanged);
}
public void zAML_AlarmListSelectionChanged(zenOn.IAlarmItem obItem) {
this.Variables().Item("zz_IBN_AML_SelectedVariable").set_Value(0, obItem.Name);
}
void ThisProject_Inactive() {
FreeObjects();
this.Alarm().AlarmListSelectionChanged += new zenOn.AlarmListSelectionChangedEventHandler(zAML_AlarmListSelectionChanged);
}


I read these posts:
http://www.copadata.com/forums/showthread.php?t=2287
http://www.copadata.com/forums/showthread.php?t=993
but unfortunately I don't get it to work.
Does this mean that I have to have the four additional events in my startup each of them with the zenOn.AlarmListSelectionChangedEventHandler? If that is the case, I didn't get it to work like that either.
C# Code:
private void ThisProject_Startup(object sender, EventArgs e {
this.Active += new zenOn.ActiveEventHandler(ThisProject_Active);
this.Inactive += new zenOn.InactiveEventHandler(ThisProject_Inactive);
this.OnPreVSTADebugStart -= new zenOn.OnPreVSTADebugStartEventHandler(ThisProject_OnPreVSTADebugStart);
this.OnVSTADebugStart -= new zenOn.OnVSTADebugStartEventHandler(ThisProject_OnVSTADebugStart);
this.OnPreVSTADebugStop -= new zenOn.OnPreVSTADebugStopEventHandler(ThisProject_OnPreVSTADebugStop);
this.OnVSTADebugStopped -= new zenOn.OnVSTADebugStoppedEventHandler(ThisProject_OnVSTADebugStopped);
}
public void ThisProject_OnPreVSTADebugStart(){
this.Alarm().AlarmListSelectionChanged += new zenOn.AlarmListSelectionChangedEventHandler(zAML_AlarmListSelectionChanged);
}
public void ThisProject_OnVSTADebugStart(){
this.Alarm().AlarmListSelectionChanged += new zenOn.AlarmListSelectionChangedEventHandler(zAML_AlarmListSelectionChanged);
}
void ThisProject_OnPreVSTADebugStop(){
this.Alarm().AlarmListSelectionChanged += new zenOn.AlarmListSelectionChangedEventHandler(zAML_AlarmListSelectionChanged);
}
public void ThisProject_OnVSTADebugStopped(){
this.Alarm().AlarmListSelectionChanged += new zenOn.AlarmListSelectionChangedEventHandler(zAML_AlarmListSelectionChanged);
}

So how do I get my debugging session and my event to work together? Thanks in advance.
Cis

This is a migrated post! Originally posted on 22.09.2014 by user cisnetandazo. Please be aware that information can be outdated.