SharpDevelop Community

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

Debugger

Last post 06-18-2008 10:16 PM by jithu. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 05-16-2008 2:53 PM

    • WFP
    • Top 200 Contributor
    • Joined on 05-08-2008
    • Posts 11

    Debugger

     Hi,

    I want to use the SD debugger in my application which contains only a simple SDTextEditor, i tried to use the ICSharpCode.SharpDevelop.Debugging.DefaultDebugger class like this :

    ICSharpCode.SharpDevelop.Debugging.DefaultDebugger debugger = new DefaultDebugger();
    debugger.Start();

    but it don't work, can someone help me ?

     Thanks.

  • 05-16-2008 3:15 PM In reply to

    Re: Debugger

    The class you mentioned is a "dummy debugger" that cannot step through the source code. This dummy is used when no debugger addin is installed. The real debugger is in src\AddIns\Misc\Debugger\Debugger.AddIn\Project\Src\Service\WindowsDebugger.cs 

     But you cannot use the debugger outside of SharpDevelop, it's bound to the addin-system; the way breakpoints and bookmarks (including "current line bookmark" are managed) etc

    What you can do is:

    - use the Debugger.Core library. You will have to write your own UI for the debugger (synchronizing breakpoints with the text editor, stepping, lists for variable display...)

    OR

    - embed SharpDevelop in your application (including the AddIn-system etc.) See http://laputa.sharpdevelop.net/AnnouncingSharpDevelopForApplicationsSDA.aspx 

    Daniel Grunwald
  • 05-16-2008 4:39 PM In reply to

    • WFP
    • Top 200 Contributor
    • Joined on 05-08-2008
    • Posts 11

    Re: Debugger

     Hi Daniel,

    Thank you so much for your answer, it was so helpfull as first step. I was waiting for and answer to Tar-K question but no one replied. I tried to launch the SDA user sample but i get always the message :

    "Could not load file or assembly 'SharpDevelop' or one of its dependencies. File not found" and an exception is thrown "FileNotFoundException" at

    "host = new SharpDevelopHost(startup);" 

    Do you have any suggestion?

    Thanks again Daniel 

  • 05-16-2008 4:52 PM In reply to

    Re: Debugger

    The SdaUser sample works for me, which version of SharpDevelop did you try?

    Daniel Grunwald
  • 05-16-2008 5:23 PM In reply to

    • WFP
    • Top 200 Contributor
    • Joined on 05-08-2008
    • Posts 11

    Re: Debugger

    I'm using the 2.2 and I tried the 3.0 too and always an exception at the same place. 

  • 05-16-2008 5:42 PM In reply to

    Re: Debugger

    Start fuslogvw (a tool in the .NET SDK, you can start it from SharpDevelop Tools > Assembly Binding Log Viewer), click Settings, and choose "Log in exception text". Then you should get more information in the error message why the assembly load failed.

    Daniel Grunwald
  • 05-16-2008 6:05 PM In reply to

    • WFP
    • Top 200 Contributor
    • Joined on 05-08-2008
    • Posts 11

    Re: Debugger

     I get :

    "Exception System.IO.FileNotFoundException was thrown in debuggee:
    Could not load file or assembly 'SharpDevelop' or one of its dependencies. File not found

    .ctor()
    RunWorkbench() - c:\Documents and Settings\bs\Bureau\SD3_source\samples\SdaUser\MainForm.cs:87,5
    ThreadedRun() - c:\Documents and Settings\bs\Bureau\SD3_source\samples\SdaUser\MainForm.cs:75,4
    WaitCallback_Context()
    Run()
    PerformWaitCallbackInternal()
    PerformWaitCallback()
    "

    something strange is that the value of the line "startup.DataDirectory= ..." is ""C:\\<mypath>\\Desktop\\SD3_source\\bin\\../data". strange path. Is there any special manner to put the sources folder and the SD installation folder or no ?

     

     

  • 05-16-2008 6:14 PM In reply to

    Re: Debugger

    Do you have SharpDevelop.exe in C:\\<mypath>\\Desktop\\SD3_source\\bin?

    SharpDevelop.exe contains the image resources and English string resources for SharpDevelop, so it's required even for SDA (though you can compile the resources into another assembly and set StartupSettings.ResourceAssemblyName).

    Also, that's not the complete exception information (it's missing the binding log); I think you get more information if you catch the exception and call ToString().

    Daniel Grunwald
  • 05-16-2008 6:19 PM In reply to

    • WFP
    • Top 200 Contributor
    • Joined on 05-08-2008
    • Posts 11

    Re: Debugger

     should I put it there too ? :s

  • 05-16-2008 6:26 PM In reply to

    Re: Debugger

    Please ensure SharpDevelop is compiled completely (no files missing from bin or any other directory). If that doesn't help, catch the exception and post the binding log here.

    Daniel Grunwald
  • 05-16-2008 7:58 PM In reply to

    • WFP
    • Top 200 Contributor
    • Joined on 05-08-2008
    • Posts 11

    Re: Debugger

    YES, it works.

    Thank you so much Daniel. 

  • 05-30-2008 12:59 PM In reply to

    • WFP
    • Top 200 Contributor
    • Joined on 05-08-2008
    • Posts 11

    Re: Debugger

    I want to implement my own debugger into my application. I know it's in ICSharpCode.SharpDevelop.Debugging, but i don't know where to to start and what are the the basics of a debugger.

    Can anyone help me or advice me an article?

    Thanks

    Filed under:
  • 06-09-2008 6:00 PM In reply to

    • DavidSrbecky
    • Top 10 Contributor
    • Joined on 08-22-2005
    • Usti nad Labem, Czech Republic
    • Posts 419
    • Team Members

    Re: Debugger

    So are you using the SDA after all?

    Unfortunatelly, there is no real documentation for the deubbger.

    The debugger is split into two main components:

    1) Debugger.Core  -  The independent debugging library

    2) Debugger.Addin  -  The SharpDevelop specific binding

     

    What do you want to exactly do?

  • 06-18-2008 10:16 PM In reply to

    • jithu
    • Not Ranked
    • Joined on 06-18-2008
    • Italy
    • Posts 5

    Re: Debugger

     Hai,

    I also want to create a program able debug c# code and i would like to use Debugger.Core library so can you say how to do that?

    Thanks in advance. 

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