RE: debugging dynamic code
- From: Wibberlet <Wibberlet@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 1 Apr 2007 05:48:01 -0700
Hi,
You can attach referenced code that you have written to a running process
and then debug your code when it is called (assuming you have the source
code); your reply here implies that perhaps you do.
The process is described here
http://msdn2.microsoft.com/en-us/library/c6wf8e4z.aspx
You can attach to multiple processes at once if required. I guess it all
depends on how you are referencing your dependant assemblies.
regards wibbleret
Development blog at http://wibberlet.blogspot.com
===================================================
"MoriCristian" wrote:
Gi wibbleret, thanks for your reply.
I need to add dynamic "scripting" in c# to a program I made (this program is
also made in c#)
I want to open an internal editor from my program, load my source file,
compile it and debug it. All this while the other components of my program
continue running.
I hope I made myself clearer.
Do you think you can help me with this issue?
Thanks
Cristian Mori
"Wibberlet" wrote:
Hi MoriCristian,
I am not quite sure what you mean here...do you want to debug an assembly
that has been compiled to IL where you do not have the associated source code?
Debugging IL is possible but certainly not easy and there will be
compromises that you have to make because of the way sequence points are
generated. Sequence points essentially map between IL instructions and native
instructions.
Depending on the size of the assembly it may be possible for you to convert
the IL code back in to source code using a tool such as .Net reflector. If
this is not possible then you could take a look at the managed debugger
located here: http://blogs.msdn.com/jmstall/archive/2004/09/30/236281.aspx.
It is restricted to #2 of the framework and is really not recommended as a
production strength utility. I guess it depends on how desperate you are to
get into the assembly.
I hope I have understood your problem properly, please let me know if that
is not the case.
wibbleret
Development blog at http://wibberlet.blogspot.com
====================================================
"MoriCristian" wrote:
Hi.
I want to debug in an app written by me (not in vs) in step by step a
routine copiled using the microsoft.csharp.compiler.
Is there any way to do so?
Thanks
Cristian Mori
- Follow-Ups:
- RE: debugging dynamic code
- From: MoriCristian
- RE: debugging dynamic code
- Next by Date: RE: debugging dynamic code
- Next by thread: RE: debugging dynamic code
- Index(es):
Relevant Pages
|
Loading