Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • George 58 posts 165 karma points
    Nov 08, 2013 @ 16:00
    George
    0

    Visual Studio debugging broken by extension

    Hello everyone,

    I have been working with an Umbraco 4.9 web site. I have been running C# code for it and compiling it through Visual Studio, then I was able to test it by using "Attach to Process" -> w3wp.exe.

    Until I made the grave mistake of installing an Extension for VS called ".NET Reflector", because I wanted to try it for another project in VS. Then I came back to developing on the site. I compiled my code for the site only once with that extention installed in VS... then I started having this error every time I tried to "Attach to Process":

    System.NullReferenceException occurred

      Message=Object reference not set to an instance of an object.

      Source=umbraco

      StackTrace:

           at umbraco.page..ctor(XmlNode xmlNode)

      InnerException: 

    Call stack:

        umbraco.dll!umbraco.page.page(System.Xml.XmlNode xmlNode = {System.Xml.DebuggerDisplayXmlNodeProxy}) + 0xa83 bytes 
    > umbraco.dll!umbraco.UmbracoDefault.Page_PreInit(object sender = {ASP.default_aspx}, System.EventArgs e = {System.EventArgs}) + 0xdfd bytes
      System.Web.RegularExpressions.dll!System.Web.Util.CalliHelper.EventArgFunctionCaller(System.IntPtr fp, object o, object t, System.EventArgs e) + 0x19 bytes
      System.Web.dll!System.Web.UI.Page.PerformPreInit() + 0x31 bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequestMain(bool includeStagesBeforeAsyncPoint = true, bool includeStagesAfterAsyncPoint = true) + 0x6b4 bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint = true) + 0xc1 bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequest() + 0x10d bytes
      System.Web.dll!System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context) + 0xa7 bytes
      App_Web_default.aspx.cdcab7d2.shiikmje.dll!ASP.default_aspx.ProcessRequest(System.Web.HttpContext context = {System.Web.HttpContext}) + 0x33 bytes C#
      System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 0x271 bytes
      System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step = {System.Web.HttpApplication.CallHandlerExecutionStep}, ref bool completedSynchronously = false) + 0x10e bytes
      System.Web.dll!System.Web.HttpApplication.PipelineStepManager.ResumeSteps(System.Exception error) + 0x6f5 bytes
      System.Web.dll!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext context, System.AsyncCallback cb) + 0x85 bytes
      System.Web.dll!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest wr = {System.Web.Hosting.IIS7WorkerRequest}, System.Web.HttpContext context = {System.Web.HttpContext}) + 0x2b6 bytes
      System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr managedHttpContext, System.IntPtr nativeRequestContext = 21719144, System.IntPtr moduleData, int flags) + 0x3bf bytes
      System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr managedHttpContext, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) + 0x22 bytes
      [Native to Managed Transition]
      [Managed to Native Transition]
      System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr managedHttpContext, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) + 0x4f4 bytes
      System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr managedHttpContext, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags) + 0x22 bytes
      [Appdomain Transition]


    The site works fine with the code I build, but I have no way of testing any of the C# functionality right now because of this Attach to Process problem...
    I already tried : Uninstalling the extension, deleting all remaining files in extention dir, restarting PC, restarting IIS and I have been digging through all sorts of .config files and through the Internet, but nothing helped so far.

    Any suggestions would be welcome, I already spent a day on this issue and I have deadlines at work that I am already behind with. I am the only IT guy in the company so there is no colleague that could help.

    PS. I don't understand how one extension could cause such a mess...

  • George 58 posts 165 karma points
    Nov 11, 2013 @ 08:27
    George
    0

    I tried installing the extension again, and I just realized there were 4 options in .NET Reflector that were turned on, by default, when I compiled my project. 

    Those 4 options were :

    1. GotoDefinition (F12) 

    2. Track Loaded Modules

    3. Disable Just My Code on startup

    4. Decompile from Call Stack

    I am assuming one or more of these options possibly changed one or more configuration files of Visual Studio or .NET. I am running out of ideas here, will try to reinstall VS if I don't solve this issue today.

  • George 58 posts 165 karma points
    Nov 12, 2013 @ 09:41
    George
    0

    Apparently the problem was:

    3.Disable Just My Code on startup.

    I enabled Just My Code it in the options again and debugging seems to work fine again, though it is not always hitting breakpoints.

     

Please Sign in or register to post replies

Write your reply to:

Draft