Visual Studio 调试未附加到 WebDev.WebServer.EXE

发布于 2024-08-07 23:10:01 字数 1215 浏览 3 评论 0原文

我有很多项目的解决方案。在调试上,我有三个 Web 项目,我想在它们自己的 Cassini ASP.NET Web 开发服务器上启动它们。在解决方案属性 → 通用属性启动项目中,我选择了多个启动项目,并将三个 Web 应用程序的 操作 设置为 开始。所有三个 Web 开发服务器都会启动,并且所有三个网页都会加载。

但是,Visual Studio 仅附加到两个 WebDev.WebServer.EXE 进程。我必须手动附加到第三个进程才能使用调试器对其进行调试。

这种行为刚刚开始发生,我不知道如何解决这个问题。

另请注意,我已多次停止并重新启动开发服务器,但行为没有任何变化。另外,当手动附加到进程时,我看到两个自动附加的 WebDev.WebServer.EXE 进程的 Type 属性是 托管,而未附加 WebDev.WebServer.EXE 进程的 Type 属性为 TSQL、托管、x86。然而,当查看项目的属性时,我的目标是 AnyCPU,并且没有启用 SQL Server 调试。

正确附加的两个项目是 C# Web 应用程序

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

未正确附加的项目是 VB.NET Web 应用程序

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

该行为在另一个工作站上是相同的。因此,这很可能不是机器特定的问题。

I have a solution with many projects. On Debug, I have three web projects that I want to start up on their own Cassini ASP.NET web development servers. In the solution properties → Common PropertiesStartup Project, I have multiple startup projects chosen with the three web applications' Action set to Start. All three web development servers start, and all three web pages load.

However, Visual Studio is only attaching to two of the WebDev.WebServer.EXE processes. I have to manually go attach to the third process in order to debug it with the debugger.

This behavior just started happening, and I'm at a loss as to how to troubleshoot this.

Also to note, I have stopped and restarted the development servers several times with no change in behavior. Also, when attaching to the process manually, I see that the Type property of the two automatically attached WebDev.WebServer.EXE processes is Managed, while the Type property of the unattached WebDev.WebServer.EXE process is TSQL, Managed, x86. When looking at the project's properties, however, I am targeting AnyCPU, and do NOT have SQL Server debugging enabled.

The two projects that attach correctly are C# web applications.

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

The project that is not attaching correctly is a VB.NET web application.

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

The behavior is the same on another workstation. So odds are that it's not a machine-specific problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

喵星人汪星人 2024-08-14 23:10:02

不确定问题可能是什么,但是当我在复杂项目中遇到问题时,我发现直接查看 .vbproj 或 .csproj 文件会有所帮助。

您是否尝试过创建一个新的 VB.NET 项目并简单地从非工作项目中复制文件?

我还尝试添加第四个非常简单的 C# Web 应用程序项目,看看 3 是否是您的配置的某种神奇数字(尽管我目前正在开发一个超过 3 的解决方案,并且调试没有问题)。您可以对一个简单的 VB.NET Web 应用程序执行相同的操作 - 然后您就会知道这是网络服务器 #3、一般 VB.NET 还是您的特定项目的问题。

Not sure what the problem might be, but when I've had problems with complex projects before I've found it helps to look at the .vbproj or .csproj files directly.

Have you tried creating a new VB.NET project and simply copying over the files from the non-working project?

I'd also try adding a 4th, very simple C# web application project to see if perhaps 3 is some sort of magic number for your configuration (though I'm currently working on a solution with more than 3 and have no problems debugging). You could do the same with a simple VB.NET web application - you'll know then whether it's a problem with webserver #3, VB.NET in general, or your specific project.

冷默言语 2024-08-14 23:10:02

Web 应用程序的 Web.config 文件中是否启用了调试?在 Visual Studio 中启动时是否设置为调试模式?

Is debugging enabled in the Web.config file of the web application? Is it set to Debug mode when you start it in Visual Studio?

与风相奔跑 2024-08-14 23:10:01

这可能是盲目的尝试,但我会查看 csproj 文件,看看不起作用的文件是否有任何明显的差异。特别是,我会查找 元素。当然,任何与网络托管相关的事情也很有趣;所以下面的任何内容:(

<ProjectExtensions>
  <VisualStudio>
    <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
      <WebProjectProperties>

或类似的内容,具体取决于您的项目风格;比较这 3 个内容是否有任何看起来不合适的地方)

This might be a shot in the dark, but I would look at the csproj files, to see if the one that isn't working has any obvious differences. In particular, I would look for a <ProjectTypeGuids> element. Anything that relates to web-hosting is of interest too, of course; so anything under:

<ProjectExtensions>
  <VisualStudio>
    <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
      <WebProjectProperties>

(or similar, depending on your flavor of project; compare between the 3 for anything that looks out of place)

梦里寻她 2024-08-14 23:10:01

右键单击主解决方案->属性->通用属性->启动项目 ->

确保将其设置为“多个启动项目”,并将所有项目设置为“启动”而不是“无”或启动而不进行调试。

还要仔细检查每个项目的 .user 文件并确保 AlwaysStartWebServerOnDebug
与任何其他调试选项一起设置为 true。

Right click on the main solution -> Properties -> Common Properties -> Start Up Project ->

Make sure it's set to "Multiple startup projects" and all are set to "Start" instead of none or start without debugging.

Also double check each projects .user file and make sure AlwaysStartWebServerOnDebug
is set to true along with any other debugging options.

仅一夜美梦 2024-08-14 23:10:01

我设置了多个启动项目,并在解决方案的属性中选择每个 Web 应用程序(在解决方案资源管理器 中右键单击解决方案→属性)。

第三个项目是 IIS Web 项目(在属性中设置)吗?我们有许多一起运行的 IIS 项目,并且我们在调试时没有任何问题。

尝试解决方案→属性配置属性配置并查看构建哪些项目以及何时构建。

I set multiple startup projects and choose each of the web applications in the properties of the solution (Right click the solution in Solution ExplorerProperties).

Is the third project an IIS web project (set in properties)? We have numerous IIS projects that run together and we don't have any issues debugging.

Try solution → PropertiesConfiguration PropertiesConfiguration and see what projects get build and when.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文