This project has moved. For the latest updates, please go here.

Sharpdevelop Debugging Event Handler problem

Dec 5, 2016 at 8:34 PM
Hi all, This is really more to do with Sharpdevelop, I've posted my question there but most posts doesn't seem to get much response there so I thought I'd try here.
I'm trying to inspect variables while debugging, in Visual Studio all works fine. In SD all works fine except when debugging within a NetOffice event handler. In the below code if I break within myOlItems_ItemAdd sub, I can't inspect any vars and everything freezes in outlook and the app. I'm sure this has something to do with threads but if anyone can confirm this and why and if there is a workaround I'd appreciate it.
Imports Outlook = NetOffice.OutlookApi

Imports NetOffice.OutlookApi.Enums

Public Partial Class MainForm

Public Sub New()


End Sub

Sub Button1Click(sender As Object, e As EventArgs)

  Dim outlookApplication As New Outlook.Application()

  Dim objNS As Outlook._NameSpace = outlookApplication.GetNamespace("MAPI")

  Dim inboxFolder As Outlook.MAPIFolder = objNS.GetDefaultFolder(OlDefaultFolders.olFolderInbox)

  Dim olInboxItems As Outlook.Items = CType(inboxFolder.Items, Outlook.Items)

  Dim ItemAdded As Outlook.Items_ItemAddEventHandler = AddressOf Me.myOlItems_ItemAdd

      AddHandler olInboxItems.ItemAddEvent, ItemAdded

End Sub

Private Sub myOlItems_ItemAdd(ByVal Item As Object)


MessageBox.Show("Made it here")

End Sub

End Class
Dec 16, 2016 at 9:27 PM

i can pin point the problem here, it is the fucking Visual Studio or SharpDevelop.
But i can clearify the problem with Daniel.

You have to copy the .pdb files in the same directory also. This is what the debugger need to help you.
Do you have the debuger symbols already?