Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jan 11, 2008 at 01:25 PM

    i had the same problem in past ! it's crazy when you move accidently over a object propertiy like orecordset.recordcount and the studio crashes.

    i solved the problem with reinstalling my computer and switching to visual studio c#

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2008 at 05:53 AM

    Hi Roland Toschek,

    Though I am not sure about exact cause and fix for this issue, one way is close all watch windows that are open while debugging.

    When you move the mouse over this object in code, it try to expose object content. Since it is a COM object (unmanaged code), it fails. I faced this issue in VB 2003 and now it am not facing this problem in 2005. It is problem with Visual Studio.

    HTH

    B Ravi Shankar

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Ravi Shankar & David,

      thanks for confirming the problem.

      >

      > I faced this issue in VB 2003 and now it am not facing this problem in 2005. It is problem with Visual Studio.

      Do I understand this right? In Visual Studio 2005 you do not have that problem anymore?

      I'm using also VS 2005 SP1 (KB926606)

      But I'm using Visual Basic (not C# which don't have that issue as David stated)

      Cheers,

      Roland

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.