除了使用Visual Studio的附加进程之外,调试ASP Classic(VBScript)的其他方法

时间:2022-05-09 05:08:29

Is there any other means to debug an ASP Classic application using Visual Studio?

有没有其他方法可以使用Visual Studio调试ASP Classic应用程序?

Right now, I have a classic ASP application and I use the IIS 5 of WinXP. I debug the ASP application right now by attaching the DLLHOST.EXE from (Debug > Attach Process) in Visual Studio 2005.

现在,我有一个经典的ASP应用程序,我使用WinXP的IIS 5。我现在通过从Visual Studio 2005中的(Debug> Attach Process)附加DLLHOST.EXE来调试ASP应用程序。

This works fine except sometimes when debugging like this the line where I am debugging becomes misaligned. Also, It is becoming very tiresome to repeat the Tools Attach Process process over and over again.

这样可以正常工作,除非有时在这样调试时我正在调试的行变得不对齐。此外,一遍又一遍地重复工具附加处理过程变得非常烦人。

I have an old Visual Studio 6.0 interdev, can it do the F5 style seamless debugging I can do in ASP .NET?

我有一个旧的Visual Studio 6.0 interdev,它可以做我在ASP .NET中可以做的F5风格的无缝调试吗?

Actually what annoys me on debugging with Visual Studio 2005 is I need to attach the dllhost.exe each time I debug.

实际上,在使用Visual Studio 2005进行调试时让我烦恼的是我每次调试时都需要附加dllhost.exe。

3 个解决方案

#1


You can make a macro in VS2005 to do this.

您可以在VS2005中创建一个宏来执行此操作。

http://blogs.msdn.com/jimgries/archive/2005/11/30/498264.aspx

Contains an example of attaching to the Calc process.

包含附加到Calc过程的示例。

Sub AttachToCalc()
       Try

              Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger
              Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default")
              Dim dbgeng(1) As EnvDTE80.Engine

              dbgeng(0) = trans.Engines.Item("Native")

              Dim proc2 As EnvDTE80.Process2 = dbg2.GetProcesses(trans, "JIMSMACHINE").Item("calc.exe")

              proc2.Attach2(dbgeng)

       Catch ex As System.Exception
              MsgBox(ex.Message)
       End Try

End Sub

#2


I find it tedious as well to the point where I avoid doing it somewhat. However, try using only your keyboard to open the website and attach to the process, for me this makes it much less tedious.

我觉得这样做很乏味,以至于我有点避免这样做。但是,尝试仅使用键盘打开网站并附加到该过程,对我而言,这使得它更加乏味。

If I remember correctly and for my environment... Alt+F E (open website) Enter Ctrl+Alt+P (Attach to process) D (to select DLL host) Enter Enter

如果我没记错并且我的环境正确... Alt + F E(打开网站)输入Ctrl + Alt + P(附加到进程)D(选择DLL主机)Enter Enter

#3


The only way to debug classic ASP in VS2005 and VS2008 is by attaching to the ASP worker process. However you can automate that with a macro so the whole ordeal is reduced to pressing a key combo. Here is an article with full working code on how to do that. It should work on any version of IIS.

在VS2005和VS2008中调试经典ASP的唯一方法是附加到ASP工作进程。但是,您可以使用宏自动执行此操作,以便将整个考验简化为按键组合。这是一篇关于如何做到这一点的完整工作代码的文章。它应该适用于任何版本的IIS。

http://blogs.msdn.com/greggm/archive/2006/03/15/552108.aspx

#1


You can make a macro in VS2005 to do this.

您可以在VS2005中创建一个宏来执行此操作。

http://blogs.msdn.com/jimgries/archive/2005/11/30/498264.aspx

Contains an example of attaching to the Calc process.

包含附加到Calc过程的示例。

Sub AttachToCalc()
       Try

              Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger
              Dim trans As EnvDTE80.Transport = dbg2.Transports.Item("Default")
              Dim dbgeng(1) As EnvDTE80.Engine

              dbgeng(0) = trans.Engines.Item("Native")

              Dim proc2 As EnvDTE80.Process2 = dbg2.GetProcesses(trans, "JIMSMACHINE").Item("calc.exe")

              proc2.Attach2(dbgeng)

       Catch ex As System.Exception
              MsgBox(ex.Message)
       End Try

End Sub

#2


I find it tedious as well to the point where I avoid doing it somewhat. However, try using only your keyboard to open the website and attach to the process, for me this makes it much less tedious.

我觉得这样做很乏味,以至于我有点避免这样做。但是,尝试仅使用键盘打开网站并附加到该过程,对我而言,这使得它更加乏味。

If I remember correctly and for my environment... Alt+F E (open website) Enter Ctrl+Alt+P (Attach to process) D (to select DLL host) Enter Enter

如果我没记错并且我的环境正确... Alt + F E(打开网站)输入Ctrl + Alt + P(附加到进程)D(选择DLL主机)Enter Enter

#3


The only way to debug classic ASP in VS2005 and VS2008 is by attaching to the ASP worker process. However you can automate that with a macro so the whole ordeal is reduced to pressing a key combo. Here is an article with full working code on how to do that. It should work on any version of IIS.

在VS2005和VS2008中调试经典ASP的唯一方法是附加到ASP工作进程。但是,您可以使用宏自动执行此操作,以便将整个考验简化为按键组合。这是一篇关于如何做到这一点的完整工作代码的文章。它应该适用于任何版本的IIS。

http://blogs.msdn.com/greggm/archive/2006/03/15/552108.aspx