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.Diagnostics.Debugger.Launch()
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
Ben Voigt [C++ MVP] - 14 Jun 2007 14:45 GMT
> Hello,
>
[quoted text clipped - 4 lines]
> 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.
Dynamic compilation isn't "in" any language. It uses opcodes directly.
Maybe you mean you generate source code and invoke the vb.net compiler
automatically? From the runtime's perspective, it is the same as if you
wrote the code in Visual Studio.
> However, I would like, if there is a runtime error in my vb.net
> execution, launch the debugger.
[quoted text clipped - 10 lines]
> But the debuger opens and stop on method-> invoke and not in vb.net
> code.
You didn't ask to stop!
Use Debugger.Break instead of Debugger.Launch.
> How could I do to have a debuging of my code which have benn compiled
> dynamically