How to open classic ASP website locally and attach to it in Visual Studio?

32,357

Although the primary focus of Web debugging in Visual Studio 2010 is ASP.NET, you can also debug legacy ASP Web applications.

ASP code executes in the Internet Information Services (IIS) process (in-process execution) or in a separate Mtx.exe process (out-of-process execution). To debug ASP code, you must attach to the IIS or Mtx.exe process. To debug client-side script as well, you must also attach to the IIS process. For information on how to attach to processes, see Attaching to Running Processes.

When you attach to an ASP Web application, make sure you select the appropriate program types in the Attach To Process dialog box. When you debug script, Managed code must not be selected. You cannot debug script and managed code at the same time in Visual Studio 2005.

and

http://msdn.microsoft.com/en-us/library/3s68z0b3.aspx

To attach to a running process

  • On the Debug menu, select Attach to Process. If no project is open, select Attach to Process on the Tools menu.

  • In the Attach to Process dialog box, find the program that you want to attach to from the Available Processes list.

  • In the Attach to box, make sure that the type of code you will debug is listed. The default Automatic setting tries to determine what type of code you want to debug. If the automatic setting is not appropriate:

  • Click Select.

  • In the Select Code Type dialog box, click Debug these code types and select the types to debug.

  • Click OK.

  • Click Attach.

Share:
32,357
Darren
Author by

Darren

Updated on December 22, 2020

Comments

  • Darren
    Darren over 3 years

    Perhaps I haven't found the right post but I have been unable to set up debugging for a ASP website. The website is running on our server but I was told to attach to it locally. Unfortunately, I cannot figure out how to do this.

    I have a local copy of the website in source control that I can open in Visual Studio but obviously Visual Studio will not run a classic ASP site. I have no idea how to go about attaching to it locally.

    I have both Visual Studio 2008 and 2010 running on Windows 7.