winforms
winforms copied to clipboard
Preserve callstack when using Control.BeginInvoke with MethodInvoker
Background and motivation
In an application we have the following code:
Private Sub MyControl_LookUpEdit_EditValueChanged(sender As Object, e As EventArgs) Handles MyControl_LookUpEdit.EditValueChanged
BeginInvoke(New MethodInvoker(AddressOf AfterMyControlChange))
End Sub
It is used to work around data binding issues where the binding source datasource isn't updated until after the EditValueChanged event (devexpress).
Occasionally we get exceptions. The call stack root is at the function level. So we don't see what triggered the function call.
It would be nice if we could preserve the callstack across the boundary allowing us to fully log it to track down issues.
API Proposal
n/a
API Usage
n/a
Alternative Designs
No response
Risks
No response
Will this feature affect UI controls?
n/a
I could be wrong on this. It could be an issue with our logging software. I'll investigate that as well.
@KlausLoeffelmann you should look at this one.