By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,361 Members | 1,700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,361 IT Pros & Developers. It's quick & easy.

Dynamic debugging problem

P: n/a
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

Jun 14 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The following blog entry, titled "Debugging Dynamically Generated Code
(Reflection.Emit)", 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]
- mv*@spam.guard.caspershouse.com

<al*************@gmail.comwrote in message
news:11**********************@a26g2000pre.googlegr oups.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.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

Jun 14 '07 #2

P: n/a
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 [.NET/C# MVP]" wrote:
The following blog entry, titled "Debugging Dynamically Generated Code
(Reflection.Emit)", 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]
- mv*@spam.guard.caspershouse.com

<al*************@gmail.comwrote in message
news:11**********************@a26g2000pre.googlegr oups.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.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


Jun 25 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.