C# C# Streams and Data Processing Streaming Data on the Net Deserialize the News Results

Aaron Selonke
Aaron Selonke
10,323 Points

How to see the request in the IDE?

Is there a way to see the full request in the IDE when running this application? When running a GET or POST request in JavaScript in the Browser, you can see the request with the headers. Is there a way to see that when running a request in IDE Debug mode?

1 Answer

TJ Grist
TJ Grist
6,548 Points

Yes there is. I'm not sure how you would do it with this example ( a console application and a rest API), but you can do it with ASP.NET MVC. You just need a certain class and namespace in .NET. With Visual Studio there is a class called Debug in the namespace Diagnostics. You can use this class in a console application or a web application. Just add the using statement:

using System.Diagnostics;

Then you can use the Debug class (only during debug mode) and the results will appear in Visual Studio's output console as long as you do something like call the function Debug.WriteLine(). So, for example, you might check to see if a string got properly sent to the server Asynchronously using AJAX. To do this, you could attempt to log it to the console like this:

Debug.WriteLine(someString);

Hope that helps.