Groups | Blog | Home
all groups > dotnet framework > june 2007 >

dotnet framework : Dynamic debugging problem


alexis.meilland NO[at]SPAM gmail.com
6/14/2007 4:58:41 AM
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
Nicholas Paldino [.NET/C# MVP]
6/14/2007 2:45:55 PM
The following blog entry, titled "Debugging Dynamically Generated Code
(Reflection.Emit)", should explain how to do this:

http://blogs.msdn.com/jmstall/archive/2005/02/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.com

[quoted text, click to view]

AddThis Social Bookmark Button