473,385 Members | 1,593 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,385 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 1109
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...
11
by: downwitch | last post by:
Hi, I'm using a 3rd-party app's back end which stores SQL statements in a table, so I have no choice but to use dynamic SQL to call them (unless someone else knows a workaround...) Problem...
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....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.