473,396 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.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
2 1603
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Jason Tesser | last post by:
I work for at a college where I am one of 2 full-time developers and we are looking to program a new software package fro the campus. This is a huge project as it will include everything from...
7
by: Jack | last post by:
Hi, I am trying to test a sql statement in Access which gives me the error as stated in the heading. The sql statement is built as a part of asp login verification, where the userid and password...
3
by: James | last post by:
Situation: I have a page, built using document.write(). When I hit 'save as', IE goes and saves the contents of 'about:blank' to that file, rather than saving the HTML it's displaying in the...
10
by: stephen.cunliffe | last post by:
Hi, Okay, here's my problem... I'm dynamically building some content (similar to this): var fooObj = document.createElement('div'); fooObj.setAttribute('id', 'uniqueNumber'); etc.
3
by: ktrvnbq02 | last post by:
Hi, We have an ASP.NET application built in Release mode via Visual Studio. All of the C# code is in the code-behind files (i.e. *.aspx.cs files) and there is no C# in the *.aspx files...
4
by: Tom | last post by:
Hi .Net Professional : In recent , I starting to learn about dynamic call .net object in vb.net. Before, some IT people teach me use the following method and its work !! Dim asm As =...
1
by: Giulio Petrucci | last post by:
Good morning everybody, I have been dealing with this strange issue for almost two days: I got stuck and I can't get out of it. I built up for the first time in my life (I'm quite new in stuff...
2
by: alexis.meilland | last post by:
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...
3
by: vainstah | last post by:
Hello Guys and Galls, To start off, I have reached the solution I was looking for, but I would like comments and feedback on the solution I have reached and tips/tricks on making it more elegant....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.