Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do debug a web-service?

Status
Not open for further replies.

d00ape

Programmer
Joined
Apr 2, 2003
Messages
171
Location
SE
How may I do the “old” cout << “This happens-debug” << endl;
To se what’s happen when a WebService is called. Is there any trace-file I can write to?

Thanks
 
if it's a webservice you wrote, you can simply add it as a project to your sollution and add checkpoints to it
 
checkpoints? - I may be stupid...
 
Ok, thanks! Thats one good thing.

Do you know if I could write to som trace-line in Visual Studio. Like System.out.println("DEBUG"); // In Java ?
 
use MessageBox.Show("message");
 
OK thanks. It seams like I have to make some kind of setting du to this error:

System.InvalidOperationException: It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options)
at System.Windows.Forms.MessageBox.Show(String text)

Suggestions?
 
Web Services and ASP.NET won't use the Windows stuff necessary to display a dialog.

You CAN, however, use Debug.WriteLine, Trace.WriteLine, etc. which can write to the Output window (or page/trace.axd file) in VS.NET.

You're looking for the System.Diagnostics namespace.

Here's a good tutorial to get you started:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top