Dynamic debugging problem

A

alexis.meilland

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
 
G

Guest

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

To generate my assembly, I used CodeDom::Compiler

So you have an idea?

Nicholas Paldino said:
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]
- (e-mail address removed)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top