No hit on breakpoint in webservice

G

Guest

I am a novice on .net debugging. I run Visual Studio 2003 Enterprise
Architect on windows xp. I have a webservice and a windows client in the same
project. The code is vb. The problem is that my breakpoints in the webservice
are never hit. I cannot debug the webservice.

The windows client is the startup project.
I have included aspnet in the group "Debugger users" in Local Users and
Groups (Control panel).

The build configuration is set to debug everywhere in VS 2003.

In the IDE I go into the debug menu, processes, double click on the
asnet_wp.exe process. (I have read I should do so on somewhere on the net.)
This seems to start some process, at least I cannot start my windows client
any more.

Where am I wrong?

Regards

Tore
 
D

Dan Rogers

From the source code view, add a break-point to your web service method on
a "break-able" line.

Then go to the Debug menu, choose the 'start' selection. Make sure your
client is the startup project. This should start your client. Exercise
the functionality that will get to the code where your breakpoint is.
Voila.

As a caveat, make sure that you can get to the line of code where you set
the breakpoint. For a starting point, put the breakpoint on the first
executable line in one of your web methods. Then invoke that method. If
it isn't getting invoked, then chances are your client is using a proxy
that is using a different instance of your service. The proxy has to point
to the instance that is being debugged.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
 
G

Guest

I have two web services on a local machine, same machine as the windows
client. I am 100% sure that the web-services run and produce results, but I
cannot set breakpoints in the web service visual basic code. (Breakpoint not
hit, execution does not stop).

Immediately after activating Start in the debug menu, I can see that a
questionmark is put in the left margin of vb code page where the breakpoint
is set. As far as I know this indicates that the debugger will not find the
actual line of code.

How can I debug the web service visual basic code?

Regards

Tore
 
D

Dan Rogers

Choose a different line of code. The line you are choosing is metadata and
will not be hit.

--------------------
Thread-Topic: No hit on breakpoint in webservice
thread-index: AcTcPlli9MHPWRCNRMSScqhz5IVjZA==
X-WBNR-Posting-Host: 83.109.167.169
From: "=?Utf-8?B?bm9zcGFtQHRneWxub3NwYW0ubm8=?="
 
G

Guest

No way. It is the line of code where I call the stored procedure in SQL
Server 2000. The stored procedure executes OK.

Tore
 
D

Dan Rogers

Your debugger needs to be attached to the web service project, and not the
client. You won't be able to step thru from the client call to the server
code.

What I do to debug services is to open the service project on the server
(from a logged in console). Then set your breakpoints if these are not
already set. Then debug/start. You should get a message to the effect
that you'll have to wait until the service is called for the debugger to
start.

Then invoke your client logic. This should cause the debugger on the
service to do it's thing.

Regards

Dan
--------------------
Thread-Topic: No hit on breakpoint in webservice
thread-index: AcTcoUJ3tXGMHcaaTm6ayomYjVJdwA==
X-WBNR-Posting-Host: 83.109.167.169
From: "=?Utf-8?B?bm9zcGFtQHRneWxub3NwYW0ubm8=?="
<[email protected]>
 

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,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top