Monday, May 11, 2009

Debug classic ASP in Visual Studio 2008 with SP1

At work we still have some classic ASP applications. Visual Studio 2008 did not support classic ASP debugging until SP1. Once you installed VS 2008 SP1, follow these steps to debug classic ASP.
1) Enable ASP server side script debugging in IIS
a. To do this, launch IIS, right click on the virtual directory of your application, and click on properties from the context menu. Select the virtual directory tab from the properties windows. Click on the Configuration button in the application settings section.


b. In the application configuration window, select the debugging tab and make sure that enable ASP server-side script debugging is checked


2) From your visual studio 2008, launch the classic ASP application by pressing F5. Wait for the asp page to show up in the browser
3) Once the application is launched, go to Debug --> Attach to Process to launch the Attach to process window. In that window, click on the Show Processes for all users checkbox to show all processes.


















4) In the list of available processes, select the process dllhost.exe with user name COMPUTERName\IWAM_COMPUTERNAME and click Attach.
5) Set a break point in classic ASP code you want to browse, the execution should stop at the break point

Digg It! Add to del.icio.us Stumble This

1 Comment:

Pablo said...

I have done all this steps and was working great, but now when I go to attach the dllhost.exe process it appears not of type scrit, just x86, what is the problem! thanks a lot in advance.