Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

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:


Hope that helps.