473,574 Members | 3,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1866

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.co m

"Benny Raymond" <be***@pocketro cks.com> wrote in message
news:ut******** *****@TK2MSFTNG P11.phx.gbl...
Does anyone know off hand if dynamically compiled C# is debuggable in .net

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 IncludeDebugInf ormation on the CompilerParamet ers 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
Nov 28 '05 #3
On Mon, 28 Nov 2005 15:57:02 -0500, Benny Raymond
<be***@pocketro cks.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:

CompilerParamet ers param = new CompilerParamet ers();
param.GenerateI nMemory = false;
param.IncludeDe bugInformation = true;
param.OutputAss embly = "C:\Temp\blah.d ll";

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

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

Similar topics

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, and invocation of a dynamic object from a strongly named assembly? If so, how do you strongly name a dynamic, in-memory assembly?
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: <%@ Control Language="c#" className="Disable1" src="Disable.ascx.cs" %> The host page for this control is named UserControl.aspx. The first 2 lines are:...
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 work orders for 7 different items, each item gets 1 page for input specs. All works well. I want to add a new item. I do not want to recompile...
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 depending on the answers that users entered in the online wizard... the only issue here, is that, once the wizard created the asp page, the online...
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 = "myMethod" code = """def myMethod(self): print "Line 1" print "My Value is %s" % self.Value
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 main menu instead of showing all possible options and only enabling/disabling certain ones. I have a table that stores the menu item name, parent...
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 to VB, plus the address bar would show something like this: www.somethinghere?id=3 and if you change number 3 from the address bar to (for example)...
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 that I found inside of a string. Any ideas?
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 web host maintains that we should pre-compile the site. I know that pre-compiling will help with the first-hit after an update to the site; but...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.