O'Reilly logo

Programming Windows® Services with Microsoft® Visual Basic® 2008 by Michael Gernaey

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

Examples of Debugging and Monitoring Your Service

When monitoring your application, you need to understand what issues to look for and how to look for them. The following examples describe issues that many applications face, including what to look for and how to debug them.

In Example 13-1, I have provided sample code from a Windows application I wrote to demonstrate using Task Manager and Visual Studio 2008 to create, debug, and validate both memory- and CPU-related performance and application issues.

Example 13-1. Windows application CPU and memory sample code for debugging demonstration.

Imports System.Threading Imports System.Net.Sockets Public Class MemoryAndCPU Private m_CPUThread As Thread = Nothing Private m_ThreadsThread As Thread = Nothing ...

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