Debugging asynchronous web services


M

Mervin Williams

Is there any way to debug from an asp.net web app into an asynchronously
called web service?

Any help would be greatly appreciated.

Mervin Williams
 
Ad

Advertisements

M

Marcel Wolterbeek

I don't know if this is the best way, but this is what I do and it works nice
in VS2008.

A breakpoint in your original javascript is not detected, because at runtime
a modified version of the script is running. So you need to set the
breakpoint in this running script. The trick to drop into the running script
is to force an exception. I do this by adding a statement to my javascript:

test = stop;

This will force an exception because there is no variable stop known. You
break at this exception, set the breakpoint anywhere you want and continue
(ignoring the exception).

Put the statement causing the exception in the calling function, not in the
callback, because an exception in the callback is caugth in the Ajax library.
 

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

Top