如何在本地打开经典ASP网站并将其附加到Visual Studio中? [英] How to open classic ASP website locally and attach to it in Visual Studio?

查看:245
本文介绍了如何在本地打开经典ASP网站并将其附加到Visual Studio中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许我找不到正确的帖子,但是我无法为ASP网站设置调试.该网站正在我们的服务器上运行,但被告知要在本地附加它.不幸的是,我不知道该怎么做.

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.

我在源代码管理中拥有网站的本地副本,可以在Visual Studio中打开该副本,但显然Visual Studio无法运行经典的ASP站点.我不知道如何在本地附加它.

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.

我在Windows 7上都运行了Visual Studio 2008和2010.

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

推荐答案

尽管Visual Studio 2010中Web调试的主要重点是ASP.NET,但是您也可以调试旧式ASP Web应用程序.

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

ASP代码在Internet信息服务(IIS)进程(进程内执行)或单独的Mtx.exe进程(进程外执行)中执行.若要调试ASP代码,您必须附加到IIS或Mtx.exe进程.要调试客户端脚本,还必须附加到IIS进程.有关如何附加到进程的信息,请参阅附加到正在运行的进程.

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.

当附加到ASP Web应用程序时,请确保在附加到进程"对话框中选择适当的程序类型.调试脚本时,不得选择托管代码.您不能在Visual Studio 2005中同时调试脚本和托管代码.

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.

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:

单击选择".

在选择代码类型"对话框中,单击调试这些代码类型",然后选择要调试的类型.

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

单击确定".

单击附件.

这篇关于如何在本地打开经典ASP网站并将其附加到Visual Studio中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆