SharpDevelop Community

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

Debug (of previous .NET version) not working with master branch

Last post 11-27-2011 9:48 PM by siegi44. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-14-2011 12:18 PM

    Debug (of previous .NET version) not working with master branch

    Hello,

    I installed both 3.2 and 4.2 versions of #develop and I cannot debug my projects with the 4.2 one: it will never stop on any breakpoints!

    [edit]I tested also with 4.1 version, the same story: debugging does not work.[/edit]

    The same project with the same breakpoints will behave correctly with the 3.2 version ...

    Anyone is aware of this issue?

    If yes, is there any workaround?

    Thank you in advance !

    Best regards,

    SoftExpert 

  • 11-15-2011 5:52 PM In reply to

    • siegi44
    • Top 10 Contributor
    • Joined on 03-31-2006
    • Steyr, Austria
    • Posts 794
    • Team Members

    Re: Debug not working with master branch

    Hello SoftExpert,

    I just tested a simple console project in both 3.x and 4.x. The project was created with 3.x and targets .NET 3.5. The debugger properly breaks at breakpoints in both versions of SharpDevelop.

    Do you use any special libraries? Can you post the configuration of your environment and the projects you are using?

    regards,

    Siegfried

     

  • 11-21-2011 7:07 PM In reply to

    Re: Debug not working with master branch

    Hello Siegfried,

    Thank you for you reply; I have a VM with Windows 2003 R2 and .NET 3.5 with latest updates and, ofcourse, 4.0

    I use SharpDevelop for quite a while and I never had problems with it (nice piece of software, by the way !)

    Now, I created (with SD 3.2) a .NET 3.5 project for integrating a component into a Kofax Capture Scan module.

    The component is declared as COMVisible and CLSCompliant. I can debug it quite easily with SD 3.2 ...

    Now, the same project is loaded in SD 4.2 and compiles OK; no conversion is performed, so that I can open it with SD 3.2; when trying to debug it wil not stop to breakpoints as if they are not set.

    The .NET wersion used by Kofax Capture is 3.5 if I'm not mistaken; also SD 4.2 should support it, no?

    I created a console project and SD 4.2 will stop at breakpoints as it should; i got the following exception though ...

     

    SharpDevelop Version : 4.2.0.8267-alpha-5f77498c
    .NET Version         : 4.0.30319.239
    OS Version           : Microsoft Windows NT 5.2.3790 Service Pack 2
    Current culture      : English (United States) (en-US)
    Working Set Memory   : 157920kb
    GC Heap Memory       : 43102kb
     
    Exception thrown:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at ICSharpCode.SharpDevelop.Services.WindowsDebugger.JumpToCurrentLine()
       at ICSharpCode.SharpDevelop.Services.WindowsDebugger.debuggedProcess_ExceptionThrown(Object sender, ExceptionEventArgs e)
       at Debugger.Process.OnExceptionThrown(ExceptionEventArgs e)
       at Debugger.Process.RaisePausedEvents()
       at Debugger.MTA2STA.<>c__DisplayClass4.<EnqueueCall>b__1()
       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.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       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:
    Failed to append recent log messages.
    System.InvalidOperationException: Sequence contains no elements
       at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
       at ICSharpCode.SharpDevelop.Sda.LogMessageRecorder.AppendRecentLogMessages(StringBuilder sb, ILog log)
       at ICSharpCode.SharpDevelop.Sda.ExceptionBox.getClipboardString()
     
    ---- Post-error application state information:
    Installed 3rd party AddIns: [Machine.Specifications Addin]
    Workbench.ActiveContent: [AvalonEditViewContent Z:\CSharp\debug\debugbreakpoints\debugbreakpoints\Program.cs]
    ProjectService.OpenSolution: [Solution: FileName=Z:\CSharp\debug\debugbreakpoints\debugbreakpoints\debugbreakpoints.sln, HasProjects=True, ReadOnly=False]
    ProjectService.CurrentProject: [CSharpProject: debugbreakpoints]

    For confidentiality reasons I cannot post the code of my project; but I can setup a generic one if you like; then you also need to have the Kofax Capture environment, which is another story ... But I can give you remote access to my dev machine - I used mikogo and it does the job just right. Please let me know if you are interested ...

     

    Thank you for your support!

    Best regards,

    SoftExpert

  • 11-21-2011 7:22 PM In reply to

    Re: Debug not working with master branch

    Hello again Siegfried,

    I just found the following reference : http://blogs.msdn.com/b/greggm/archive/2010/06/08/debugging-a-net-framework-2-0-3-0-3-5-class-library-with-vs-2010.aspx

    Seems to be the same problem as I have; could there be a workaround in SD for it? Maybe an element in the project options (a dropdown list) with the preferred debugger version  ( if it is possible to force a debugger version ) ...

    For the moment, the workaround is to create the myapp.exe.config file

    < ? xml version="1.0" >
    <configuration>
        <startup>
            <supportedruntime version="v2.0.50727">
        </supportedruntime></startup>
    </configuration>
    

    Best regards,

    SoftExpert

  • 11-27-2011 9:48 PM In reply to

    • siegi44
    • Top 10 Contributor
    • Joined on 03-31-2006
    • Steyr, Austria
    • Posts 794
    • Team Members

    Re: Debug not working with master branch

    Hi,

    sorry for not answering for a while. I am not really a debugger expert, so I might not be able to help you a lot. So your problem is, that the "main" project is compiled to .NET 4 and a precompiled library is targetting 3.5? I doubt this should be a problem, because when we have some projects inside SharpDevelop that target previous .NET frameworks but are run on CLR 4.

    I am glad you found a simple workaround in your case.

    regards,

    Siegfried

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