aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 123 forks source link

F5 debug hangs indefinitely (never attaches) if .UseIISIntegration() is removed #960

Closed NickCraver closed 7 years ago

NickCraver commented 7 years ago

Found this via https://github.com/aspnet/Tooling/issues/152#issuecomment-273611786. While the failure makes sense, the user is left baffled as to what's going wrong. If the .UseIISIntegration() call is removed, the F5 debugger experience is waiting to attach, indefinitely.

I confirmed this is currently still an issue in build 26116.0.

Repo steps:

  1. Download MiniProfiler repo: https://github.com/MiniProfiler/dotnet/tree/68f282276c568f709db0af13588a15f7e39ac7e6
  2. Edit /samples/Samples.AspNetCore/Program.cs, commenting out .UseIISIntegration()
  3. Start debugging on the Samples.AspNetCore application

cc @balachir @gortok

davkean commented 7 years ago

@BillHiebert?

mlorbetske commented 7 years ago

TFS Bug#378952

BillHiebert commented 7 years ago

I do not see this with the latest VS builds with the standard ASP.NET core web application project or with the MiniProfiler application. The debugger attaches fine. The browser is spinning waiting for a response but that is expected. I can break into the debugger fine and it is typically on the host.Run() line in Program.cs.

gortok commented 7 years ago

@BillHiebert By latest VS Build, do you mean Visual Studio 2017 RC 3? or an internal build? We still see it in VS 2015 with update 3.

Michael-Knapp-ZocDoc commented 7 years ago

This happened to me today with the latest released bits of VS 2017 freshly downloaded and creating a ASP.NET core web app - I had to manually add .UseIISIntegration() to make it not hang.

BillHiebert commented 7 years ago

I still haven't been able to repro this. @Michael-Knapp-ZocDoc - can you grab a 32 bit crash dump when VS is in the hung state?

  1. Launch %WinDIR%\syswow64\Taskmgr.exe (32-bit)
  2. Right-click on Visual Studio and choose Create dump file
barrytang commented 7 years ago

Hi, we haven't heard back from you. If you still run into this, please follow Bill's steps to help us diagnose the problem. Thanks!

njtrentacoste commented 7 years ago

@BillHiebert @barrytang I am currently experiencing this issue with VS 2017 v15.2.26430.15. What I noticed was that if I close the browser that opens when hitting F5 VS starts responding and I am able to set breakpoints and debug as desired. I did grab a crashdump if you want it. I'm just curious what about the browser is causing things to lock up? And also is that expected behavior and if so why? Thanks.

Additionally, upon stopping debugging, VS hangs and I'm prompted with a dialog stating "Debugging is being stopped but is not yet complete. You can force debugging to stop immediately, but any processes being detached may be terminated instead." This dialog appears to not go away on its own. I have to click the "Stop Now" button.

davkean commented 7 years ago

@njtrentacoste Can you open a bug over on http://github.com/dotnet/project-system? We'll route it to the right team.

njtrentacoste commented 7 years ago

@davkean I created the ticket 2 days ago and there's been no movement on it. Are you waiting on something more from me?

davkean commented 7 years ago

No, we'll take it from here. Make note this isn't a ticket or a support request with a timeframe. If you are blocked on the issue, please contact Microsoft Support Services.