Dynamic debugging problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alexis.meilland@gmail.com

    #1

    Dynamic debugging problem

    Hello,

    Well, I have a problem with a dynamic debuging.

    My program is winform program written in Managed c++.

    I compile dynamically a dll in vb.net. It works well. To execute a
    function in my dll I use the invoke function. It works well.

    However, I would like, if there is a runtime error in my vb.net
    execution, launch the debugger.

    So I used in my vb.net code,

    System.Diagnost ics.Debugger.La unch()

    When I invoke the method, I have a window, which asks me which debuger
    I want to use.

    I choose new instance of debug clr 2005

    But the debuger opens and stop on method-invoke and not in vb.net
    code.

    How could I do to have a debuging of my code which have benn compiled
    dynamically

  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Dynamic debugging problem

    The following blog entry, titled "Debugging Dynamically Generated Code
    (Reflection.Emi t)", should explain how to do this:

    http://blogs.msdn.com/jmstall/archiv...03/366429.aspx

    Basically, you will have to define the document where the code is
    located with a call to DefineDocument on the module (along with other calls,
    of course).

    Hope this helps.

    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    <alexis.meillan d@gmail.comwrot e in message
    news:1181822321 .503498.198160@ a26g2000pre.goo glegroups.com.. .
    Hello,
    >
    Well, I have a problem with a dynamic debuging.
    >
    My program is winform program written in Managed c++.
    >
    I compile dynamically a dll in vb.net. It works well. To execute a
    function in my dll I use the invoke function. It works well.
    >
    However, I would like, if there is a runtime error in my vb.net
    execution, launch the debugger.
    >
    So I used in my vb.net code,
    >
    System.Diagnost ics.Debugger.La unch()
    >
    When I invoke the method, I have a window, which asks me which debuger
    I want to use.
    >
    I choose new instance of debug clr 2005
    >
    But the debuger opens and stop on method-invoke and not in vb.net
    code.
    >
    How could I do to have a debuging of my code which have benn compiled
    dynamically
    >

    Comment

    • =?Utf-8?B?ZGFsdG9uNQ==?=

      #3
      Re: Dynamic debugging problem

      The solution is interesting. However, I am not using reflexion.emit

      To generate my assembly, I used CodeDom::Compil er

      So you have an idea?

      "Nicholas Paldino [.NET/C# MVP]" wrote:
      The following blog entry, titled "Debugging Dynamically Generated Code
      (Reflection.Emi t)", should explain how to do this:
      >
      http://blogs.msdn.com/jmstall/archiv...03/366429.aspx
      >
      Basically, you will have to define the document where the code is
      located with a call to DefineDocument on the module (along with other calls,
      of course).
      >
      Hope this helps.
      >
      --
      - Nicholas Paldino [.NET/C# MVP]
      - mvp@spam.guard. caspershouse.co m
      >
      <alexis.meillan d@gmail.comwrot e in message
      news:1181822321 .503498.198160@ a26g2000pre.goo glegroups.com.. .
      Hello,

      Well, I have a problem with a dynamic debuging.

      My program is winform program written in Managed c++.

      I compile dynamically a dll in vb.net. It works well. To execute a
      function in my dll I use the invoke function. It works well.

      However, I would like, if there is a runtime error in my vb.net
      execution, launch the debugger.

      So I used in my vb.net code,

      System.Diagnost ics.Debugger.La unch()

      When I invoke the method, I have a window, which asks me which debuger
      I want to use.

      I choose new instance of debug clr 2005

      But the debuger opens and stop on method-invoke and not in vb.net
      code.

      How could I do to have a debuging of my code which have benn compiled
      dynamically
      >
      >
      >

      Comment

      Working...