How do you handle debugging of the extension?

Developer
Jan 3, 2012 at 3:41 AM

I am getting a NullReferenceException which is immediately crashing VS2010, I have tried attaching a debugger onto VS however it isn't giving me the trace of VS side of things, although I suspect it might be a bug within the extension. I would have though VS2010 would have had better unhandled exception handling for Extensions.

 

Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an object.
Exception Stack Trace:    at Microsoft.VisualStudio.Modeling.GlobalEventManagerImpl.NotifyObservers(Object sender, EventArgs e)
   at Microsoft.VisualStudio.Modeling.TransactionEventManagerImpl.NotifyObservers(Object sender, EventArgs e)
   at Microsoft.VisualStudio.Modeling.Transaction.Commit()
   at Microsoft.VisualStudio.Modeling.Diagrams.ConnectAction.CreateConnection()
   at Microsoft.VisualStudio.Modeling.Diagrams.ConnectAction.OnClicked(MouseActionEventArgs e)
   at Microsoft.VisualStudio.Modeling.Diagrams.MouseAction.InvokeStateChangeMethods(MouseActionState oldState, MouseActionState newState, DiagramClientView diagramClientView, ActionRequest nextAction)
   at Microsoft.VisualStudio.Modeling.Diagrams.MouseAction.FlushInternalEventQueue()
   at Microsoft.VisualStudio.Modeling.Diagrams.MouseAction.MouseUp(DiagramMouseEventArgs mouseArgs)
   at Microsoft.VisualStudio.Modeling.Diagrams.DiagramClientView.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Microsoft.VisualStudio.Modeling.Diagrams.DiagramClientView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


-------------------------

Installed Extensions
    DevExpress Tools
    State    =    Enabled
    Version    =    11.2.6

    NuGet Package Manager
    State    =    Enabled
    Version    =    1.6.21215.9133

    VisualSVN
    State    =    Enabled
    Version    =    2.0.5.0

    VSCommands 2010
    State    =    Enabled
    Version    =    3.8.0.0

    InstallAwareVsPackage
    State    =    Disabled
    Version    =    1.0

    Productivity Power Tools
    State    =    Enabled
    Version    =    10.0.20626.18

    Liekhus Entity Framework DevExpress XAF Extensions
    State    =    Enabled
    Version    =    1.1



-------------------------

Environment Data
VisualStudio.Version    =    10.0
VisualStudio.Edition    =    Ultimate
VisualStudio.FullName    =    C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
VisualStudio.RegistryRoot    =    Software\Microsoft\VisualStudio\10.0
VisualStudio.LocaleId    =    1033
VisualStudio.DisplayMode    =    vsDisplayMDITabs
Time.UTC    =    3/01/2012 4:39:48 AM
Time.Local    =    3/01/2012 2:39:48 PM
OS.Architecture    =    AMD64
Environment.Version    =    4.0.30319.239
Environment.HasShutdownStarted    =    False
Environment.OSVersion.Platform    =    Win32NT
Environment.OSVersion    =    6.1.7601.65536
CurrentThread.Id    =    1
CurrentThread.Name    =    [null]
CurrentThread.ThreadState    =    Background
CurrentThread.IsBackground    =    True
CurrentThread.UICulture    =    English (United States)
CurrentThread.Culture    =    English (Australia)
Process.PagedMemorySizeMB    =    501.578125
Process.MaxWorkingSetMB    =    1.34765625
Process.NonpagedSystemMemorySizeMB    =    0.269634246826172
Process.PagedSystemMemorySizeMB    =    1.38602447509766
Process.PrivateMemorySizeMB    =    501.578125
Process.VirtualMemorySizeMB    =    1152.00390625
Process.WorkingSetMB    =    552.87109375
Process.UpTime    =    00:07:36.0630853

 

Developer
Jan 5, 2012 at 11:21 PM

Got this sorted, have made some changes to the project to make it easier to debug.