Skip to Content
0
Former Member
Jan 11, 2008 at 12:38 PM

Visual Studio (VB.NET) hangs when monitoring a DI-Object while debugging

58 Views

Hello @All!

This situation crazes me since a long time:

When debugging the code of an AddOn and monitoring a DI-Object then Visual Studio freezes for a long (felt) time and after that the code runs to...I don't know where to.

Stopping of debugging is recommended then to get normal behaviour again.

Yes: I could avoid monitoring DI-Obj. with "Mark DI Object Variable and pressing Shift+F9". Using a MessageBox instead also works even though it is annoying me...

BUT:

Often the code/VS hangs because I unintentional move the mouse over a DI Object Variable. This is because of the little menu on the code screen which opens while mouseOver a variable. This also monitors a DI-Object and VS hangs.

This REALLY annoys me because moving the mouse is a big risc on a breakpoint. I must move the mouse very carefully to stay away from DI-Objects.

I could reproduce this issue on an own DLL (but I certainly don't know if this also is the reason in SAPBobs.com-DLL).

In my DLL I've implemented a property which returns a new created object (also from that DLL) like this example:

Public Class Example
    Private _oParcel As Parcel
    Private _ParcelNo As String = ""
    Private _ParcType As Common.ParcelTypes = Common.ParcelTypes.Undefined

    Public ReadOnly Property Parcel() As Parcel
        Get
            _oParcel = New Parcel(SboCon.SboDI)
            If Not _oParcel.GetByKey(_ParcelNo, _ParcType) Then
                Throw New Exception(Common.LastError)
            End If
            Return _oParcel
        End Get
    End Property
End Class

When debugging/monitoring an object of the Example-Class the same VS-error occurs. But not when the property is implemented as a function:

Public Class Example
    Private _oParcel As Parcel
    Private _ParcelNo As String = ""
    Private _ParcType As Common.ParcelTypes = Common.ParcelTypes.Undefined

    Public Function Parcel() As Parcel
        _oParcel = New Parcel(SboDI)
        If Not _oParcel.GetByKey(_ParcelNo, _ParcType) Then
            Throw New Exception(Common.LastError)
        End If
        Return _oParcel
    End Function
End Class

Could this be the same as in SAPBobs.com-DLL?

But more important would be to avoid the hanging of Visual Studio. Any ideas?

B1 and SDK Vers. 2005 PL39

Visual Studio 2005 SP 1

Visual Basic .NET

Cheers,

Roland