473,385 Members | 1,872 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.

dynamically compiled c# code - is it debuggable in 2.0?

Does anyone know off hand if dynamically compiled C# is debuggable in
..net 2.0?
Nov 28 '05 #1
3 1859
Benny,

This would depend on where you are getting the code from. The IDE would
have to be able to find the code file somehow. If you were getting it from
a database or something of that nature, I don't think that it would work
(very little would, actually).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Benny Raymond" <be***@pocketrocks.com> wrote in message
news:ut*************@TK2MSFTNGP11.phx.gbl...
Does anyone know off hand if dynamically compiled C# is debuggable in .net
2.0?

Nov 28 '05 #2
> Does anyone know off hand if dynamically compiled C# is debuggable in
.net 2.0?

You can allways debug a dissassembly of the code, but when it comes to debugger
symbols it depends. If you generate the code with the CodeDOM or use a string
based template, and compile with an ICompiler implementation, you can set
the IncludeDebugInformation on the CompilerParameters argument passed to
the ICodeCompiler's compile methods to generate a PDB-file.
If you're using Reflection.Emit, you're generating IL code on the fly, and
hence you haven't got any source code to generate debugging symbols for.

Anders Norås
http://dotnetjunkies.com/weblog/anoras/
Nov 28 '05 #3
On Mon, 28 Nov 2005 15:57:02 -0500, Benny Raymond
<be***@pocketrocks.com> wrote:
Does anyone know off hand if dynamically compiled C# is debuggable in
.net 2.0?


With Visual Studio 2002/2003, you could debug a dynamically compiled
C# file within the IDE as long as you wrote the DLL & PDB data to
physical files, like so:

CompilerParameters param = new CompilerParameters();
param.GenerateInMemory = false;
param.IncludeDebugInformation = true;
param.OutputAssembly = "C:\Temp\blah.dll";

I haven't tried yet if Visual Studio 2005 can debug code that was
dynamically compiled in-memory.
--
http://www.kynosarges.de
Nov 29 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Thomas W. Brown | last post by:
If I am using the CSharpCodeProvider to dynamically compile an in-memory assembly from some C# source, do I need to worry about signing this assembly if I'm doing the compilation, instantiation,...
2
by: Eric | last post by:
I'm trying to dynamically load a user control using on the .NET framework (not Visual Studio). The control was designed in Visual Studio and is named: Disable.ascx The first line is: <%@...
12
by: Wardeaux | last post by:
All, Wanting to find a way to create web pages to add to my website without having to recompile the codebehind everytime I want to add a new one... Here's the deal: I have a web app that takes...
5
by: Tascien | last post by:
I was able to build an asp page dynamically depending on the question that the user answered through the online wizard... I think i can dynamically also create '.vb' or '.aspx' dynamically...
2
by: Ed Leafe | last post by:
Hi, Thanks to the help of many on this list, I've been able to take code that is created by the user in my app and add it to an object as an instance method. The technique used is roughly: nm...
7
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the...
9
by: netasp | last post by:
hi all, how can I populate one aspx form when page is loading based on page ID? for example: loading page A (to search for VB code) would display labels and texboxes, dropdown lists all related...
94
by: smnoff | last post by:
I have searched the internet for malloc and dynamic malloc; however, I still don't know or readily see what is general way to allocate memory to char * variable that I want to assign the substring...
1
by: BigDave | last post by:
Hi all, We have the desire to improve the "first hit lag" issue our their still low-volume asp.net 2.0 site. I maintain that the app is being unloaded from IIS 6 due to idleness. However, our...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.