Chapter 11 -- Multimachine, Multiprocess Tracing

[Previous] [Next]

Chapter 11

These days it's common for an application to have a front end written in one language, three or four components written in other languages, and yet another part that is running in a different process or on a completely different machine. Trying to track down a bug that occurs between the Microsoft Visual Basic, Scripting Edition (VBScript), code in an Active Server Pages Web page and an object that the code calls on another machine can be a hair-raising experience. Unfortunately, no debuggers currently exist that will allow you to single-step across machines or even do something you'd think would be simple, such as step from VBScript into a C++ control. Debugging modern applications is definitely not easy.

In this chapter, I'll present a tool, TraceSrv, that allows you to easily add trace statements to all the parts of your applications, no matter what machine they reside on, and lets you view all the output in the same place. Although not as useful as the ultimate debugger—in which you'd be able to single-step everything, everywhere—TraceSrv at least gives you a fighting chance of tracking down problems in your multilanguage, multiprocess, and multimachine development. As all good developers know, trace statements are right up there with ASSERT macros in the Good Things list. You can never have enough of either.

In presenting TraceSrv, I'll start by laying out the set of requirements I had and the underlying technology decisions I made, and then I'll highlight what went on as I was designing and developing this tool. Most of the code for TraceSrv isn't rocket science. I originally thought that TraceSrv would be fairly easy to develop, but as it turned out I spent a great deal of time filling many holes in my knowledge. I hope I can save you from some of the frustrations that I had to deal with.



Debugging Applications
Debugging Applications for MicrosoftВ® .NET and Microsoft WindowsВ® (Pro-Developer)
ISBN: 0735615365
EAN: 2147483647
Year: 2000
Pages: 122
Authors: John Robbins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net