Using DebugView to catch debug output of .NET program
Join the DZone community and get the full member experience.
Join For FreeAfter downloading and unzipping DebugView you can run it and select debug output options. I suggest you to run it as Administrator because otherwise it may state that there is already debugger up and running when you try to check Capture Global Win32 option.
DebugView starts listening immediately. As a next thing I will write some debug information to my code. This is one of my action methods in very early state and it’s safe to play with it.
public ActionResult Index(int page = 1) { Debug.WriteLine("HomeController.Index: started, page=" + page); PagedResult<Event> events; using (var model = new EventsEntities()) { events = model.ListPublicEvents(page); } Debug.WriteLine("HomeController.Index: finished"); return View(events); }
Now let’s run the code and see what DebugView is able to catch. Don’t run the code through Visual Studio as it attaches its own debugger and DebugView is not able to catch the output then.
Besides log messages you can also see how much time it takes to move from one debug output to another. If you have lengthy output then you can also use find functionality to search for specific log messages.
Published at DZone with permission of Gunnar Peipman, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Authorization: Get It Done Right, Get It Done Early
-
Introduction To Git
-
5 Key Concepts for MQTT Broker in Sparkplug Specification
-
Which Is Better for IoT: Azure RTOS or FreeRTOS?
Comments