Web应用程序的远程调试服务器端与Visual Studio 2008 [英] Remote Debugging Server Side of a Web Application with Visual Studio 2008

查看:127
本文介绍了Web应用程序的远程调试服务器端与Visual Studio 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我读过,这不是我的测试服务器的机器上安装VS2008,因为它改变了运行时环境太是个好主意。我从来没有尝试远程调试与Visual Studio之前,那么什么是最好的方式来获得由服务器端Web应用程序code线远程调试线。我希望能够设置一个断点,重视,并开始加紧逐行验证code流动,要知道,调试和东西。)

So, I've read that it is not a good idea to install VS2008 on my test server machine as it changes the run time environment too much. I've never attempted remote debugging with Visual Studio before, so what is the "best" way to get line by line remote debugging of server side web app code. I'd like to be able to set a breakpoint, attach, and start stepping line by line to verify code flow and, you know, debug and stuff :).

我相信大部分的答案会涉及到ASP.NET code,我感兴趣的是,但我目前的code碱基实际上是传统的ASP和ISAPI扩展,所以我很在乎这多一点。

I'm sure most of the answers will pertain to ASP.NET code, and I'm interested in that, but my current code base is actually Classic ASP and ISAPI Extensions, so I care about that a little more.

另外,我的测试服务器在VMware上运行,我注意到在VMWare安装提一些关于调试支持最新的,但我不熟悉这意味着什么......任何使用它,这是什么做的你呢?

Also, my test server is running in VMWare, I've noticed in the latest VMWare install it mentioning something about debugging support, but I'm unfamiliar with what that means...anyone using it, what does it do for you?

推荐答案

首先,这是如果服务器和工作站都在同一个域(服务器需要访问连接到你的机器)容易得多。在C:\\ Program Files文件\\微软的Visual Studio 9.0 \\ Common7 \\ IDE \\远程调试器\\ X86(或x64或ia64)目录下,你需要复制到你的服务器上的文件。有Visual Studio的版本之间的不同的版本,所以请确保它们匹配的客户端和服务器端。在服务器上,火起来msvsmon。它会这样说:Msvsmon开始了新的服务器名为XXX @ YYYY。这是你在​​Visual Studio中使用连接到该服务器的名称。你可以进入工具>选项来设置服务器的名称并设置身份验证模式(希望Windows身份验证) - 顺便说一句无认证不适合管理code工作。

First, this is MUCH easier if both the server and your workstation are on the same domain (the server needs access to connect to your machine). In your C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86 (or x64, or ia64) directory are the files you need to copy to your server. There are different versions between Visual Studio versions, so make sure they match on the client and server side. On the server, fire up msvsmon. It will say something like "Msvsmon started a new server named xxx@yyyy". This is the name you'll use in Visual Studio to connect to this server. You can go into Tools > Options to set the server name and to set the authentication mode (hopefully Windows Authentication) - BTW No Authentication doesn't work for managed code.

在客户端,打开Visual Studio并加载你要调试解决方案。然后去调试>附加到进程。在限定词字段中输入服务器的名称,你看到它出现较早。点击选择按钮,选择您要调试code的类型,然后点击确定。希望你会看到,你可以连接到服务器上的进程的列表(你也应该看到服务器上调试监视器刚才说你​​连)。发现该过程要附加到(如果需要启动的应用程序)。如果它是一个ASP.NET网站,你会选择w3wp.exe的,然后点击连接。设置断点,希望你现在远程调试code。

On the client side, open up Visual Studio and load the solution you're going to debug. Then go to Debug > Attach to Process. In the "Qualifier" field enter the name of the server as you saw it appear earlier. Click on the Select button and select the type of code you want to debug, then hit OK. Hopefully you'll see a list of the processes on the server that you can attach to (you should also see on the server that the debugging monitor just said you connected). Find the process to attach to (start up the app if necessary). If it's an ASP.NET website, you'd select w3wp.exe, then hit Attach. Set your breakpoints and hopefully you're now remotely debugging the code.

据我所知 - VMWare的选项,可以调试它从工作站启动code虚拟机内部,而且。

AFAIK - the VMWare option lets you start up code inside of a VM but debug it from your workstation.

这篇关于Web应用程序的远程调试服务器端与Visual Studio 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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