开发者

Visual Studio debugging is not attaching to WebDev.WebServer.EXE

开发者 https://www.devze.com 2022-12-08 18:06 出处:网络
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 Properties

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开发者_StackOverflow 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.


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)


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.


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.


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.


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号