Debugging Helper: The ISAPI WebDbg Tool


ATL Server comes with a very helpful tool, ISAPI WebDbg (webdbg.exe). This tool allows you to read the trace generated by an ATL Server (debug) application without attaching the Visual Studio debugger to the IIS process.

ATL Server creates a named pipe where all the trace messages are pushed . WebDbg opens the other end of the named pipe and displays all the traces and assertions from the ATL Server application. Even more helpful, WebDbg can access the ATL Server trace pipe on a different machine.

You can launch webdbg.exe from the Program Files menu in the Visual Studio .NET Tools submenu. Alternately, you can launch it from the command line as webdbg.exe ( assuming that the VS Tools directory is in the path ).

Now you ll see how you can use the tool with a new wizard-generated ATL Server application. Just add the following line in the OnHello replacement method (or any replacement method, if you decide to use an existing application):

 ATLTRACE("Executing HelloWorld\n"); 

Then launch the WebDbg application and also launch the application in the browser. As the replacement method is executed, the message is displayed in the text area of the tool. In the File menu of the WebDbg tool, select Select Pipe to use the following pipe name to connect to the ATL Server pipe on another machine:

 \<server_name>\pipe\AtlsDbgPipe 

(You can use . for the server name to point to the local machine.)

WebDbg provides some other helpful features, such as filtering a message based on the prefix or based on ATL Server regular expressions. In addition, you can break the application in the debugger whenever a particular message is traced. To do so, in the Filter dialog box select the Break on message option.




ATL Server. High Performance C++ on. NET
Observing the User Experience: A Practitioners Guide to User Research
ISBN: B006Z372QQ
EAN: 2147483647
Year: 2002
Pages: 181

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