views:

226

answers:

3

I have a ASP.NET web service that I used to asynchronously save data to my database. I have a button on my webpage that invokes a javascript method which looks through the dom, gathers the data and sends it off to the service.

I'm debugging a problem right now that I believe is happening in this web service, and I would like to debug the web service when it gets invoked, but I'm not sure if this can be done, and if so how?

Something very strange is going on in that service, so I'd like to be able to step through it and figure out where the problem is occurring.

+1  A: 

Have you tried placing a breakpoint in the codebehind in the web service? It works fine for me... but maybe I'm missing something.

Tom Ritter
I tried placing a breakpoint and it didn't catch it for some reason.
Tony Peterson
Hmm, before the breakpoint didn't work, this time it did.
Tony Peterson
A: 

Firebug was made for exactly this task http://getfirebug.com/ on the client side.

On the server side, use standard tools (debuggers, loggers ...)

Luka Marinko
+2  A: 

You will need to attach the debugger to the process hosting the web service. This would be aspnet_wp in IIS 5, w3wp in IIS 6 or 7, or could be the Visual Studio Development Server if it's running in the same solution.

Once the debugger is attached, simply open the source of the service and set breakpoints. If you're attached to the correct process, then the breakpoints will appear as filled-in circles; if not, they'll be hollow circles with a warning icon. Hover over the icon to see what the problem is.

John Saunders