在网站的根目录下,Visual Studio调试器未附加 [英] The Visual Studio debugger is not attaching when at the root of a website

查看:100
本文介绍了在网站的根目录下,Visual Studio调试器未附加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在环境中运行Visual Studio 2008调试器时,我没有附加到默认网站的根目录。

I have a problem with my Visual Studio 2008 debugger not attaching to the root of the default website when I run from within the environment.

我有一个.NET 3.5在Visual Studio 2008 SP1上运行的Web应用程序项目。我已将项目设置为使用本地IIS Web服务器,其路径为 http:// localhost / 。我能够创建虚拟目录,并且应用程序可以正常编译。

I have a .NET 3.5 Web application project running on Visual Studio 2008 SP1. I have set the project to "Use Local IIS Web server" with a path of "http://localhost/". I am able to create the Virtual Directory and the application compiles fine.

我的问题是,当Internet Explorer启动时,调试器未连接。我能够附加到进程并选择 w3wp.exe,它将进行调试。这是一个PITA;为什么它不会自动附加?

My problem is that when Internet Explorer launches, the debugger is not connected. I am able to "Attach to Process" and choose "w3wp.exe", and it will debug just fine. This is a PITA; why will it not automatically attach?

我曾经在VD下运行这个完全相同的项目,但从来没有调试器没有附加问题。

I used to run this exact same project under a VD and never had an issue with the debugger not attaching. Thoughts?

推荐答案

我遇到的问题与以下事实有关:我在web.config中有一个标签,包围了我标签。显然,这会导致调试器挂接,然后立即出错,而没有任何警告或错误。这是我用来弄清楚的文章:

The problem I was having was related to the fact that I had a tag in my web.config that surrounded my tag. This evidently causes the debugger to attach and then error out immediately without any sort of warning or error. Here is the article I used to figure this out:

无法调试具有顶级位置的网站

这篇关于在网站的根目录下,Visual Studio调试器未附加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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