Debugging reference.vb

E

Eric

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
 
E

Eric

Eric said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top