Visual Studio 2015 not working after first successful debug

喜夏-厌秋 提交于 2021-01-28 01:57:56

问题


I have updated Visual Studio 2015 to the first update. Since then I cannot debug my code twice in a row. It goes like this:

  1. I start VS and try to debug. So far OK
  2. Change code, build and debug.
  3. Try to reach a web but it never loads.

If I close the VS and load the solution again it works or If I do not change code in step 2.

Other thing I noticed is the IIS Express Worker process is consuming most of CPU time.

And apparently the symbols are not loaded (I do not see the messages of DLL loading in the status bar).

This is making my development process very slow and tedious.

The solution is a MVC project under 4.6.1 framework.

Any ideas? Thank you very much!!


回答1:


You should boot Visual Studio into Safe Mode. To enter safe mode do the following:

  1. Open Command Prompt, as Administrator.
  2. Enter: cd C:\Program Files (x86)\Microsoft Visual Studio 14.0
  3. Enter devenv.exe /safemode

If Visual Studio does load and debug, then more than likely an extension or an update is the culprit. This will allow you to also see which updates may have occurred. The other potential issue would be if your Internet Information System had an issue.

  1. Otherwise if your Internet Information System is stuck 'on'.
  2. CTRL + ALT + DELETE
  3. Go to processes, end W3P process.
  4. Try to launch and debug inside Visual Studio.

Otherwise, simply try restarting your computer. We would need more information, as this can occur for an assortment of reasons.




回答2:


@Julen - I have the same issue as you and I have found a work-around.

Add the "Terminate all" button to your toolbar and use it instead of just stopping the debugging. This command kills the IIS Express process.

See how to add it here: Automatically Kill IIS Express Process After Debugging (VS Express 2013 Web)




回答3:


It might be hanging when trying to load external symbols. I had a problem with that before.

To test this theory:

  1. Open the Tools menu.
  2. Click 'Options'.
  3. Find and expand 'Debugging' on the left.
  4. In the 'Symbol file (.pdb) locations' list, uncheck everything.
  5. Click OK and see if the problem reappears.



回答4:


If your IIS doesn't shut down after stopping the debugger, you could do one of the tricks written in this blog post - but the opposite way because the article focuses on keeping the debugger on.


Here is the proposed solution 2 - to check "Enable Edit and Continue":

Similar to VS 2013, if you disable Edit and Continue IIS Express will continue to run when you stop your debug sessions. Open the menu item Tools/Options, look for the Debugging/General option. Scroll down and uncheck “Enable Edit and Continue”



来源:https://stackoverflow.com/questions/34399839/visual-studio-2015-not-working-after-first-successful-debug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!