O'Reilly logo

Windows Application Development Cookbook by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Logging information while debugging

Sometimes, it is inconvenient to place many breakpoints in the code to see how the application, or its particular module, is being executed. In such a case, it is a good idea to log various information and present it to the developer in the IDE in real time.

In this recipe, you will learn how to perform such a task using the Debug class from the System.Diagnostics namespace as well as present logs in the IDE within the Output window.

Getting ready

To complete this recipe, you need the project with two pages, represented by the MainPage and ProductsPage classes. It is necessary to pass a category identifier while navigating from MainPage to ProductsPage.

How to do it...

To prepare an example that shows how to log ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required