简体   繁体   English

如何使用VS 2010 Beta2在本地IIS 7.5上正确调试Web应用程序?

[英]How to correctly debug web applications on local IIS 7.5 with VS 2010 Beta2?

I'm sort of new to developing Asp.net webapplication projects while running them on a local IIS. 我在开发Asp.net webapplication项目的同时,在本地IIS上运行它们时,我有点新鲜。 Till now I used the 'Use Visual Studio Development Server' option. 直到现在我使用了“使用Visual Studio开发服务器”选项。 I'm using Visual Studio 2010 Beta 2. 我正在使用Visual Studio 2010 Beta 2。

Edit: less complex sample code 编辑:不太复杂的示例代码

Following code sample: 以下代码示例:

        List<string> _list = new List<string>();
        _list.Add("asd");
        _list.Add("asd2");
        _list.Add("asd3");

Now I want to debug / step through some line of codes with _list . 现在我想使用_list调试/逐步执行某些代码
While using 'Use Visual Studio Development Server' I can see the contents of _list in the quick watch. 在使用“使用Visual Studio开发服务器”时,我可以在快速监视中看到_list的内容。
If I select 'Use Local IIS Web server' and debug through the same piece of code, the quickwatch tries to display me the same values by showing me a spinning wheel for about 10 seconds with a resulting ' Function evalutation disabeld because a previous function evalution timed out. 如果我选择“使用本地IIS Web服务器”并通过同一段代码进行调试,则快速手表会向我显示相同的值,方法是向我显示一个约10秒的旋转轮,结果“ 功能评估因为之前的功能评估而被取消时间到。 You must continue execution to reenable function evalution ' message. 您必须继续执行以重新启用功能评估 '消息。

Afterwards I get a windows error dialog with ' Unhandeld win32 exception occured in w3wp.exe [844] The Just-In Time debugger was launched without necessary security permission ..' 之后我得到一个Windows错误对话框,其中包含' w3wp.exe中出现的Unhandeld win32异常[844] Just-In Time调试器在没有必要的安全权限的情况下启动了

I do run Visual Studio 2010 Beta 2 as Administrator. 我以管理员身份运行Visual Studio 2010 Beta 2。 I start debugging by pressing F5. 我按F5开始调试。 It seems that I can't really debug this way. 看来我无法以这种方式进行调试。 Do I somehow have to attach the VS debuggerto the IIS process? 我是否必须以某种方式将VS调试附加到IIS进程? If yes, how to do so? 如果是,怎么办?

What am I doing wrong, and how to solve it? 我做错了什么,以及如何解决?

And by the way, is that erroneous behaviour new in VS 2010? 顺便说一句,VS 2010中的错误行为是新的吗? I've never expierencied that in VS 2008. 我在VS 2008中从未表现出这种情况。

Just-In-Time debugging is a feature that launches the Visual Studio debugger automatically when a program, running outside Visual Studio, encounters a fatal error. 即时调试是一种在Visual Studio外部运行的程序遇到致命错误时自动启动Visual Studio调试器的功能。

  • One one hand it is an indication that your process is crashing due to some error. 一方面,它表明您的进程由于某些错误而崩溃。

Try disabling JIT Debugger . 尝试禁用JIT调试器 I have not used VS 2010 RC but process in VS2008 are as follows. 我没有使用过VS 2010 RC,但在VS2008中的过程如下。

Tools -> Options -> Debugging -> Just-In-time and then uncheck the all just in time checks. 工具 - > 选项 - > 调试 - > 即时 ,然后取消选中所有即时检查。 Click okay. 点击没关系。


Hope this helps 希望这可以帮助

I found the solution. 我找到了解决方案。 After enabling Windows Authentification for my Website in the IIS it worked. 在IIS中为我的网站启用Windows身份验证后,它工作正常。 Hope this helps anybody in the future. 希望这有助于未来的任何人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM