Debugging reference.vb

Discussion in 'ASP .Net Web Services' started by Eric, Dec 7, 2006.

  1. Eric

    Eric Guest

    Hello,

    We have VB.NET dll that calls a web service. The webservice has a
    public function DoSomething that has several parameters, in order to
    specify the time out and url we added the following hacks to the
    Reference.vb:

    Public Sub New(ByVal URL As String, ByVal Timeout As Integer)
    MyBase.New()

    If URL <> "" Then
    Me.Url = URL
    Else
    Me.Url = "http://myurl.asmx"
    End If

    If (Me.IsLocalFileSystemWebService(Me.Url) = True) Then
    Me.UseDefaultCredentials = True
    Me.useDefaultCredentialsSetExplicitly = False
    Else
    Me.useDefaultCredentialsSetExplicitly = True
    End If

    'set timeout
    Me.Timeout = Timeout * 1000

    End Sub

    When we ported our app from VS 2003 to VS 2005, it generated a new
    References.vb, so I had to go back into it to do our hacks. The
    previous code snippet is the VS.NET 2005 version of the New after I've
    made the changes. I know that you're not supposed to edit the
    References.vb, but we're doing several things that I don't think would
    be possible otherwise.

    Modifying the New got the error to go away when we instantiate the web
    service, but I'm getting some further errors so I'm trying to debug my
    ..NET dll. I'm having problems stepping into the New method inside
    References.vb. Inside my .NET dll that calls the web service I have:

    Dim AWebService As New com.somecopany.www.MyWebService(URL, Timeout)

    I can't get into the New method. I have a breakpoint there, but I see
    the message:

    The Breakpoint will not currently be hit. Breakpoints cannot be set in
    a method or class with the "DebuggerStepThrough" attribute when the
    debugger option, "Just My Code" option is enabled. Does anyone know
    how to turn off the "Just My Code" debugger option?

    -Eric
     
    Eric, Dec 7, 2006
    #1
    1. Advertising

  2. Eric

    Eric Guest

    Eric wrote:
    > Hello,
    >
    > We have VB.NET dll that calls a web service. The webservice has a
    > public function DoSomething that has several parameters, in order to
    > specify the time out and url we added the following hacks to the
    > Reference.vb:
    >
    > Public Sub New(ByVal URL As String, ByVal Timeout As Integer)
    > MyBase.New()
    >
    > If URL <> "" Then
    > Me.Url = URL
    > Else
    > Me.Url = "http://myurl.asmx"
    > End If
    >
    > If (Me.IsLocalFileSystemWebService(Me.Url) = True) Then
    > Me.UseDefaultCredentials = True
    > Me.useDefaultCredentialsSetExplicitly = False
    > Else
    > Me.useDefaultCredentialsSetExplicitly = True
    > End If
    >
    > 'set timeout
    > Me.Timeout = Timeout * 1000
    >
    > End Sub
    >
    > When we ported our app from VS 2003 to VS 2005, it generated a new
    > References.vb, so I had to go back into it to do our hacks. The
    > previous code snippet is the VS.NET 2005 version of the New after I've
    > made the changes. I know that you're not supposed to edit the
    > References.vb, but we're doing several things that I don't think would
    > be possible otherwise.
    >
    > Modifying the New got the error to go away when we instantiate the web
    > service, but I'm getting some further errors so I'm trying to debug my
    > .NET dll. I'm having problems stepping into the New method inside
    > References.vb. Inside my .NET dll that calls the web service I have:
    >
    > Dim AWebService As New com.somecopany.www.MyWebService(URL, Timeout)
    >
    > I can't get into the New method. I have a breakpoint there, but I see
    > the message:
    >
    > The Breakpoint will not currently be hit. Breakpoints cannot be set in
    > a method or class with the "DebuggerStepThrough" attribute when the
    > debugger option, "Just My Code" option is enabled. Does anyone know
    > how to turn off the "Just My Code" debugger option?
    >
    > -Eric


    Tools | Options

    Then, check "Show All Settings" then uncheck "Enable Just My Code"
    allowed me to do it.
     
    Eric, Dec 7, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Johann Blake
    Replies:
    1
    Views:
    1,224
    Hermit Dave
    Jan 5, 2004
  2. Replies:
    0
    Views:
    361
  3. Niels L Ellegaard

    Automatic debugging of copy by reference errors?

    Niels L Ellegaard, Dec 9, 2006, in forum: Python
    Replies:
    16
    Views:
    479
  4. jacob navia

    Debugging C vs debugging C++

    jacob navia, Oct 26, 2006, in forum: C Programming
    Replies:
    11
    Views:
    609
    Ian Collins
    Oct 27, 2006
  5. AAaron123
    Replies:
    3
    Views:
    680
    AAaron123
    Jul 28, 2009
Loading...

Share This Page