Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


May 2001

Configuring IIS for Visual InterDev 6.0 ASP Debugging

RSS
Subscribe to Windows Web Solutions | See More Active Server Pages (ASP) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

If you don't have the contents of an existing Web application to use to test debugging, locate Session_VBScript.asp. This file is part of the standard IIS 5.0 installation on Windows 2000, and you can find it in the \inetpub\iissamples\sdk\asp\applications directory. Drag the file to the newly created directory. Session_VBScript.asp is a standalone Active Server Pages (ASP) file that serves as a great test for debugging.

You now have a Visual InterDev environment ready for debugging. Let's put it into action.

Putting IIS Debugging into Action
When you open the Visual InterDev project you just created, you can add the files and folders of the Web application to your Visual InterDev project. To add your folders, right-click the project name, then select New Folder. To add your files (or .asp files such as Session_VBScript.asp), right-click the project name, then select Add, Items. Next, locate the start file for your Web application (e.g., default.asp or default.htm). From Visual InterDev, right-click the start file and click Set As Start Page.

Now, choose an .asp file in your Web application that you want to debug. Edit the .asp file by opening it within your Visual InterDev project. Select a location in which you want the debugger to break—in other words, stop your .asp file in the middle of its operation to examine the values of any variable it might be using. To stop the .asp file, enter the reserved word STOP within a section of server-side ASP code. You can quickly identify the server-side code within an .asp file by the delimiters <% and %>, which Visual InterDev highlights in yellow. Save the file.

Press the F5 key (or choose Debug, Start from the Visual InterDev menu), and you're off and running. The message that Figure 7 shows will appear. Click Yes. (This message appears only once.) Then, the Debugging: Name and Password Required dialog box appears, which tells you that you've succeeded in setting up ASP debugging on this project.

After you authenticate, you can examine the values of variables that are being used in the Web application. Notice that your browser is in a suspended state, waiting for Visual InterDev to act. The real power of this kind of debugging is that it lets developers see the values of many of the variables. In this way, they can find out whether a DLL they're using is passing them the kind of values they expected, and if not, debugging can help them figure out what's needed. Visual InterDev debugging also allows a closer look at the routines' step-by-step processes, which is a tremendous help in weeding out the bugs in code under development.

For example, from Visual InterDev, choose View, Debug Windows, Immediate. In the Immediate dialog box, type the name of a variable that the .asp file you're debugging is using preceded by the print statement for VBScript, which is a question mark (?), such as

"? Session("SessionCountVB")")

Visual InterDev outputs the value of the variable to the immediate window, as Figure 8 shows.

Debugging Makes Development Easier
Although setting up Visual InterDev for debugging is a lengthy process, the increased environmental control that this kind of debugging affords software developers is well worth the effort. For more information about configuring IIS debugging in Visual InterDev, go to http://msdn.microsoft.com/vinterdev/technical/articles/debugging.asp. Next month, I'll show you how to set up, configure, and use the Win2K Indexing Service on the Internet and on your corporate LAN, intranet, and extranet.

Note: If your instructions include a step to clear the FrontPage Server Extensions check box, ignore them. Earlier versions of the Help documentation erroneously include this step.

Note: You don't actually need to add STOP statements within your .asp files. Because debugging is working correctly, you can simply set breakpoints by choosing the line on which you want to break and selecting Debug, Insert Breakpoint from the Visual InterDev menu. You can also click in the left margin of your ASP editing page, which inserts a breakpoint and leaves a large black dot in the margin. Click the black dot to remove the breakpoint.

End of Article

   Previous  1  [2]  Next  


Reader Comments
Great article. I configured the IIS and Visual InterDev on my Win2k PC and since then, I have abandoned lot of guess-work and numerous Response.Write() statements.

Hope to see some more good ones on the site soon.

Mustansir July 26, 2002


Hi,

I am a software engineer.

It is a good article but it did not work even after i followed all the steps mentioned by you.

I am using Windows XP professional as Operating system.

As per article i have installed Server Applications and Tools and installed VS service pack 5.

Now whenever i started a new project the first dialog which prompts to enter server name doesn't show my IIS server name in the combo box.IIS is installed on my machine.

When i enter my IIS server name (which is same my computer name) in the combo box and press next then for few seconds it shows a message contacting web server and prompt me to enter password for <domainname>\ishwar.jindal account.
Now even after entering my domain account password it keep on prompting me to enter password.

I have tried entering my IIS server name, localhost, 127.0.0.1 but it still prompts me to enter the password for domain account.

Why it is promting me enter the password for my domain account when the IIS is installed on my machine and then why it is not accepting when i am giving the passowrd.?

Ishwar Jindal October 30, 2003


Great article, at last I can configure proper site debugging without the need to resort to inserting alert statements, or Response.Write()'s.

Robert December 03, 2003


I am having the same problem as Ishwar Jindal.

Oh well....

Anonymous User December 06, 2004


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...


Related Events Concrete Ways to Make Sure Your SharePoint Deployment Doesn't Blow Up

Virtualization Management

Delivering Reliable and Effective Web-Based Applications

Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing