SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Unhandled exception while trying to debug an ExcelDna add-in, SD 5.1

Last post 03-04-2017 5:48 PM by abcdefg30. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-13-2017 10:10 PM

    Unhandled exception while trying to debug an ExcelDna add-in, SD 5.1

    I received the below exception while trying to use the debugger on an ExcelDna add-in.  The exception was thrown on the first breakpoint before any interactive features were available.  Worth noting that I can debug the add-in with no issues using SD 4.4 including running through breakpoints.  I also do not have any issues running the debugger alongside the add-in to collect Debug.Print messages.  The issue comes when trying to enter the code with a breakpoint.

    Not sure what additional info would be helpful to track down this issue.  I assume a simple ExcelDna add-in would fail and that this is not specific to any code I am running since the breakpoint is at the first line of the function being called.  Let me know if you need/want a minimal example to demonstrate the behavior.

     

    SharpDevelop Version : 5.1.0.5216-0e58df71

    .NET Version         : 4.6.01055

    OS Version           : Microsoft Windows NT 6.1.7601 Service Pack 1

    Current culture      : English (United States) (en-US)

    Running under WOW6432, processor architecture: x86-64

    Working Set Memory   : 280608kb

    GC Heap Memory       : 127521kb

     

    Exception thrown:

    System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)

       at Debugger.TypeSystemExtensions.ModuleMetadataInfo.GetMetadataToken(IUnresolvedEntity entity)

       at Debugger.TypeSystemExtensions.GetMetadataToken(IMethod method)

       at Debugger.PDBSymbolSourceExtensions.GetSymMethod(IMethod method)

       at Debugger.PdbSymbolSource.Handles(IMethod method)

       at Debugger.Process.<>c__DisplayClass73_0.<GetSymbolSource>b__0(ISymbolSource s)

       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)

       at Debugger.Process.GetSymbolSource(IMethod method)

       at Debugger.StackFrame.get_NextStatement()

       at ICSharpCode.SharpDevelop.Services.WindowsDebugger.JumpToCurrentLine()

       at ICSharpCode.SharpDevelop.Services.WindowsDebugger.debuggedProcess_DebuggingPaused(Object sender, DebuggerPausedEventArgs e)

       at Debugger.Process.OnPaused(DebuggerPausedEventArgs e)

       at Debugger.ManagedCallback.<>c__DisplayClass13_0.<ExitCallback>b__0()

       at Debugger.MTA2STA.<>c__DisplayClass6_1.<EnqueueCall>b__0()

       at Debugger.MTA2STA.PerformCall()

       at Debugger.MTA2STA.PerformAllCalls()

       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)

       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)

       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)

       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

     

    ---- Recent log messages:

    14:04:27.033 [23] DEBUG - Received command ReportEvent

    14:04:27.220 [23] DEBUG - Received command ReportEvent

    14:04:27.659 [1] DEBUG - Resolved (Line 174, Col 4) to 

    14:04:27.938 [23] DEBUG - Received command ReportEvent

    14:04:27.940 [23] DEBUG - Received command ReportEvent

    14:04:27.940 [23] DEBUG - Received command BuildDone

    14:04:27.941 [23] INFO - Finished building ExcelFormulaViewer, success=True

    14:04:27.941 [1] INFO - Debugger Command: Start (withDebugger=True)

    14:04:27.941 [1] INFO - Saving layout file: C:\Users\TDAUser\AppData\Roaming\ICSharpCode\SharpDevelop5\layouts\Default.xml

    14:04:27.942 [1] INFO - Loading layout file: C:\Users\TDAUser\AppData\Roaming\ICSharpCode\SharpDevelop5\layouts\Debug.xml, hideAllLostPads=False

    14:04:27.986 [1] DEBUG - ChooseLayoutCommand.LayoutChanged(object,EventArgs)

    14:04:27.986 [1] DEBUG - ChooseLayoutCommand.Run()

    14:04:27.986 [1] INFO - Saving layout file: C:\Users\TDAUser\AppData\Roaming\ICSharpCode\SharpDevelop5\layouts\Debug.xml

    14:04:28.000 [1] DEBUG - ActiveContentChanged to [AvalonEditViewContent C:\Documents\TDA Programming\ExcelFormulaViewer\ExcelFormulaViewer\MyClass.cs]

    14:04:28.419 [1] DEBUG - Resolved (Line 174, Col 4) to 

    14:04:32.152 [24] DEBUG - Resolved (Line 183, Col 9) to 

    14:04:34.114 [1] DEBUG - Resolved (Line 162, Col 3) to 

    14:04:37.941 [5] DEBUG - Telling worker process to exit

    14:04:37.941 [5] DEBUG - Waiting for thread-join

    14:04:37.943 [23] DEBUG - Cannot read from WorkerProcess 11192: end of stream

    14:04:37.943 [23] DEBUG - Stopped reading from WorkerProcess 11192.

    14:04:37.943 [23] DEBUG - Telling worker process to exit

    14:04:37.943 [23] DEBUG - End of reader thread on WorkerProcess 11192.

    14:04:37.944 [5] DEBUG - Joined!

    14:04:39.265 [1] ERROR - ThreadException caught

    --> Exception:

    System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)

       at Debugger.TypeSystemExtensions.ModuleMetadataInfo.GetMetadataToken(IUnresolvedEntity entity)

       at Debugger.TypeSystemExtensions.GetMetadataToken(IMethod method)

       at Debugger.PDBSymbolSourceExtensions.GetSymMethod(IMethod method)

       at Debugger.PdbSymbolSource.Handles(IMethod method)

       at Debugger.Process.<>c__DisplayClass73_0.<GetSymbolSource>b__0(ISymbolSource s)

       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)

       at Debugger.Process.GetSymbolSource(IMethod method)

       at Debugger.StackFrame.get_NextStatement()

       at ICSharpCode.SharpDevelop.Services.WindowsDebugger.JumpToCurrentLine()

       at ICSharpCode.SharpDevelop.Services.WindowsDebugger.debuggedProcess_DebuggingPaused(Object sender, DebuggerPausedEventArgs e)

       at Debugger.Process.OnPaused(DebuggerPausedEventArgs e)

       at Debugger.ManagedCallback.<>c__DisplayClass13_0.<ExitCallback>b__0()

       at Debugger.MTA2STA.<>c__DisplayClass6_1.<EnqueueCall>b__0()

       at Debugger.MTA2STA.PerformCall()

       at Debugger.MTA2STA.PerformAllCalls()

       at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)

       at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)

       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)

       at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

     

    ---- Post-error application state information:

    Installed 3rd party AddIns: 

    ProjectService.CurrentSolution: [Solution C:\Documents\TDA Programming\ExcelFormulaViewer\ExcelFormulaViewer.sln with 1 projects]

    ProjectService.CurrentProject: [CSharpProject: ExcelFormulaViewer]

    Workbench.ActiveContent: [AvalonEditViewContent C:\Documents\TDA Programming\ExcelFormulaViewer\ExcelFormulaViewer\MyClass.cs]

  • 03-04-2017 5:48 PM In reply to

    Re: Unhandled exception while trying to debug an ExcelDna add-in, SD 5.1

    I got exactly the same error after trying to load a ".pdb" of a seperate dll using "Assembly.Load(dll, pdb)" (in order to be able to use breakpoints inside the dll code).

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.