locked
MVC5/IIS Express unable to debug - Code Not Running RRS feed

  • Question

  • I start a VS2013 VB.Net MVC5 Web Application, set a breakpoint in HomeController About method and run "Start Debugging", navigate to About page and receive the message "Code not running - The current Thread is not currently running or the call stack could not be obtained" preventing any debugging.

    If I set a breakpoint in Global.asax Application_Start, the breakpoint works fine. Changing the "Enable Edit & Continue" makes no difference.

    Anyone have any ideas what is happening?

    Graeme

    Saturday, October 19, 2013 5:04 PM

Answers

  • The solution to the above problem was a simple one. Close down dev environments, go to Documents folder and rename IISExpress. Now set environment variable _CSRUN_DISABLE_WORKAROUNDS ( ref: http://gauravmantri.com/2013/02/05/workaround-for-iis-express-crashing-when-running-windows-azure-cloud-service-web-role-with-multiple-instances-in-windows-azure-sdk-1-8-compute-emulator/ ). 

    Now reboot PC, start VS, load website and run in debug. IIS automatically regenerated the IISExpress folder and the environment variable resolved conflicts.

    Thanks for your help Jack. The Environment variable was found in your second link and the second link in that thread. The renaming of the IISExpress folder was just a stab in the dark.

    • Marked as answer by GraGra_33 Monday, October 28, 2013 3:11 AM
    Monday, October 28, 2013 3:11 AM

All replies

  • Hi Graeme,

    Thank you for posting in the MSDN forum.

    Which VS2013 Version are you using? Not the real web app expert, but I just create the default MVC app in VS2013 ultimate RTM, and then debug it, I could get the result like the following screen shot, so it seems that it works well in my side. Could you create a simple sample? Whether it has the same issue? If it has the same issue? I’m afraid that it would be related to your VS IDE.

    If possible, you need locate to the IDE folder then run these commands:

    Devenv.exe /SafeMode

    Devenv.exe /ResetSettings: Restores the IDE's default settings, optionally resets to the specified VSSettings file.

    Devenv.exe /ResetAddin: Removes commands and command UI associated with the specified Add-in.

    Devenv.exe /ResetSkipPkgs: Clears all SkipLoading tags added to VSPackages.

    After these, you can create a new project in a new workspace to avoid if there’re any problems of the old workspace settings.

    If this issue is also exists, I think you need to reinstall the VS2013.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 21, 2013 11:04 AM
  • Thanks for the reply.

    I was running VS2013 Ultimate on Win 8 pro. I did re-install VS2013 several times however the same issue.

    So I have just flushed my computer, did a complete fresh install of Win 8.1 pro, VS2010 ultimate, VS2012 ultimate & VS2013 ultimate + all service packs/updates.

    I had to alter Windows Smartscreen - set to Warn.

    The issue now is that both VS2012 Ultimate & VS2013 Ultimate, when running in Admistator Mode, are both now reporting "Process with an Id of xxx is not running. (Debug Output: The program '[7720] iisexpress.exe: Program Trace' has exited with code 0 (0x0). The program '[7720] iisexpress.exe' has exited with code -1073741816 (0xc0000008) 'An invalid handle was specified'.)

    Any thoughts?

    Friday, October 25, 2013 9:35 AM
  • Hi Graeme,

    As my precious reply, whether all web apps have this issue?

    If just the specific web app has this issue, to help you resolve this issue, I suggest you post this issue to the specific development forum, and you could post this issue in http://forums.asp.net where asp.net experts live in, and there you would get dedicated support.  You could share a simple sample in your new thread, I think it would be helpful for the web expert to troubleshoot and resolve this issue. Thanks for your understanding.

    But as my precious reply, if a simple web app still has this issue, since it still has this issue after you re-install the VS, to help you solve this issue, you could create connect report for it. You will get email notification for update.http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx, if you summit it, you could share us the link here, so we could know the latest information from the product team expert.

    Have a nice day,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Sunday, October 27, 2013 9:02 AM
  • If I run IIS Express in a command prompt I receive the following error:

    IIS Express Command Prompt Trace Report with Error

    Sunday, October 27, 2013 10:56 AM
  • Hi Graeme,

    Thanks for your response. As you already submit one feedback on the Microsoft Connect site, let's focus on the case on that channel, may the senior members can provide more professional support.

    In addition, based on the error message provide by you, I found some threads/report about the similiar issue, if possible, you could refer them, maybe you could get useful information.

    https://connect.microsoft.com/VisualStudio/feedback/details/800318/visual-studio-fails-to-launch-iis-express

    http://forums.iis.net/t/1196767.aspx

    http://connect.microsoft.com/VisualStudio/Feedback/details/747046

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 28, 2013 2:24 AM
  • 1. https://connect.microsoft.com/VisualStudio/feedback/details/800318/visual-studio-fails-to-launch-iis-express

    Try the folder mapping fix mentioned and am still seeing the "module not found" error.

    IIS Express Error


    Monday, October 28, 2013 2:54 AM
  • The solution to the above problem was a simple one. Close down dev environments, go to Documents folder and rename IISExpress. Now set environment variable _CSRUN_DISABLE_WORKAROUNDS ( ref: http://gauravmantri.com/2013/02/05/workaround-for-iis-express-crashing-when-running-windows-azure-cloud-service-web-role-with-multiple-instances-in-windows-azure-sdk-1-8-compute-emulator/ ). 

    Now reboot PC, start VS, load website and run in debug. IIS automatically regenerated the IISExpress folder and the environment variable resolved conflicts.

    Thanks for your help Jack. The Environment variable was found in your second link and the second link in that thread. The renaming of the IISExpress folder was just a stab in the dark.

    • Marked as answer by GraGra_33 Monday, October 28, 2013 3:11 AM
    Monday, October 28, 2013 3:11 AM
  • Glad to know that you resolved it.

    Have a nice day,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, October 28, 2013 6:28 AM