Well, if there's one thing I've learned it's that posting my questions here is the magic ingredient to fixing it 5 minutes later. Here's hopin!
I have a moderately functional Non-Destructive Debugging processing working. I can create a new project from a template, hook up the debugging events, type code in the add-in and debug it. Once the code runs I can hit a button over on my host .exe and see the updated values. All appears to be well. The problem is that I'm having really strange behavior when stepping through code in the Add-in, particularly when trying to read values out of HostItem properties.
For the sake of discussion, let's say I have the following in my Add-In:
Private Sub DownloadFileDefinition_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
Me.Name = "SomeValue"
End Sub
I can set a break point on the one line of code and it will stop there. But, If I hover over the .Name property, or try the Immediate window with "?Me.Name" it will hang up and never return a value.
However, if I follow these steps exactly, I can read and update the value all I want from the Immediate Window:
1) Start Debug with a break on [Me.Name = "SomeValue"].
2) When the break hits, hit F10 to step down to [End Sub].
3) In the Immediate window type [Me.Name] which returns an expected error since I didn't give it a value.
4) In the Immediate window type [?Me.Name] and it will show "SomeValue" as expected.
5) Continue setting and retrieving Me.Name in any way I want.
6) Hit F5 to exit the method.
Now for the strange stuff. If I don't follow these steps exactly, say skip what seems to be an irrelevent step #3, it will hang. If I jump right to trying to set the value, it will hang. If I don't F10 past the line of code in the code window, it will hang.
There seems to be some conversation that needs to go on between the Proxy in Debug Land and the Actual HostItem in the host .exe and if that doesn't happen just so, the IDE gets stuck. I'm hoping there is some bit of code that I neglected to call before starting the debug, but if that were the case, I'd expect none of it to work.
Anyone seen this type of madness before?
Thx.