[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Use Debugger in Application

John

7/2/2002 3:15:00 PM

How do I make use of the .NET Debugger in my application? For example, my
application hosts other assemblies (implement IMyAppInterface). I want to
provide users the capability to debug thier assemblies while running in the
context of my application.

Would I just make the Debugger attach to my application process? any other
way of invoking the debugger from application? (e.g.
InvokeDebugger(LoadedAssembly)?

Thx






5 Answers

Nicholas Paldino [.NET/C# MVP]

7/2/2002 3:17:00 PM

0

John,

It's not as easy as you think. To run a debugger session, you have to
also have access to the original source as well to match up with the IL
being run.

In order to debug, you will have to hook into the runtime itself, which
can be done, but it is NO small task. You would have to implement
everything yourself, there is no pre-defined module/package/class for this
(at least in the framework).

Hope this helps.


--
- Nicholas Paldino [.NET MVP]
- nicholas.paldino@exisconsulting.com

"John" <john_w_john2001NOSPAMNOSPAM@yahoo.com> wrote in message
news:OtH83lcICHA.1712@tkmsftngp08...
> How do I make use of the .NET Debugger in my application? For example, my
> application hosts other assemblies (implement IMyAppInterface). I want to
> provide users the capability to debug thier assemblies while running in
the
> context of my application.
>
> Would I just make the Debugger attach to my application process? any other
> way of invoking the debugger from application? (e.g.
> InvokeDebugger(LoadedAssembly)?
>
> Thx
>
>
>
>
>
>


John

7/2/2002 3:55:00 PM

0

Thanks Nicholas. Yes, we are assuming we have access to the source. Any
pointers/directions on how to go about this?

Thx.

"Nicholas Paldino [.NET/C# MVP]" <nicholas.paldino@exisconsulting.com> wrote
in message news:uuBDyscICHA.2580@tkmsftngp09...
> John,
>
> It's not as easy as you think. To run a debugger session, you have to
> also have access to the original source as well to match up with the IL
> being run.
>
> In order to debug, you will have to hook into the runtime itself,
which
> can be done, but it is NO small task. You would have to implement
> everything yourself, there is no pre-defined module/package/class for this
> (at least in the framework).
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET MVP]
> - nicholas.paldino@exisconsulting.com
>
> "John" <john_w_john2001NOSPAMNOSPAM@yahoo.com> wrote in message
> news:OtH83lcICHA.1712@tkmsftngp08...
> > How do I make use of the .NET Debugger in my application? For example,
my
> > application hosts other assemblies (implement IMyAppInterface). I want
to
> > provide users the capability to debug thier assemblies while running in
> the
> > context of my application.
> >
> > Would I just make the Debugger attach to my application process? any
other
> > way of invoking the debugger from application? (e.g.
> > InvokeDebugger(LoadedAssembly)?
> >
> > Thx
> >
> >
> >
> >
> >
> >
>
>


Nicholas Paldino [.NET/C# MVP]

7/2/2002 4:25:00 PM

0

John,

Look at the section of the .NET framework documentation titled "Runtime
Debugger (Cordbg.exe)", located at (watch for line wrap):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/c...
l/cpgrfruntimedebuggercordbgexe.asp

The source code for cordbg.exe was shipped with the framework I believe,
and you can use that as an example of how to hook up to the runtime.


--
- Nicholas Paldino [.NET MVP]
- nicholas.paldino@exisconsulting.com


"John" <john_w_john2001NOSPAMNOSPAM@yahoo.com> wrote in message
news:uImpO8cICHA.1120@tkmsftngp13...
> Thanks Nicholas. Yes, we are assuming we have access to the source. Any
> pointers/directions on how to go about this?
>
> Thx.
>
> "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldino@exisconsulting.com>
wrote
> in message news:uuBDyscICHA.2580@tkmsftngp09...
> > John,
> >
> > It's not as easy as you think. To run a debugger session, you have
to
> > also have access to the original source as well to match up with the IL
> > being run.
> >
> > In order to debug, you will have to hook into the runtime itself,
> which
> > can be done, but it is NO small task. You would have to implement
> > everything yourself, there is no pre-defined module/package/class for
this
> > (at least in the framework).
> >
> > Hope this helps.
> >
> >
> > --
> > - Nicholas Paldino [.NET MVP]
> > - nicholas.paldino@exisconsulting.com
> >
> > "John" <john_w_john2001NOSPAMNOSPAM@yahoo.com> wrote in message
> > news:OtH83lcICHA.1712@tkmsftngp08...
> > > How do I make use of the .NET Debugger in my application? For example,
> my
> > > application hosts other assemblies (implement IMyAppInterface). I want
> to
> > > provide users the capability to debug thier assemblies while running
in
> > the
> > > context of my application.
> > >
> > > Would I just make the Debugger attach to my application process? any
> other
> > > way of invoking the debugger from application? (e.g.
> > > InvokeDebugger(LoadedAssembly)?
> > >
> > > Thx
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>


Tim Dawson

7/2/2002 4:35:00 PM

0

Surely you could implement a debugger by starting the cordbe.exe process and
controlling it via stdio?

Tim

"Nicholas Paldino [.NET/C# MVP]" <nicholas.paldino@exisconsulting.com> wrote
in message news:ejDuATdICHA.1180@tkmsftngp09...
> John,
>
> Look at the section of the .NET framework documentation titled
"Runtime
> Debugger (Cordbg.exe)", located at (watch for line wrap):
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/c...
> l/cpgrfruntimedebuggercordbgexe.asp
>
> The source code for cordbg.exe was shipped with the framework I
believe,
> and you can use that as an example of how to hook up to the runtime.
>
>
> --
> - Nicholas Paldino [.NET MVP]
> - nicholas.paldino@exisconsulting.com
>
>
> "John" <john_w_john2001NOSPAMNOSPAM@yahoo.com> wrote in message
> news:uImpO8cICHA.1120@tkmsftngp13...
> > Thanks Nicholas. Yes, we are assuming we have access to the source. Any
> > pointers/directions on how to go about this?
> >
> > Thx.
> >
> > "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldino@exisconsulting.com>
> wrote
> > in message news:uuBDyscICHA.2580@tkmsftngp09...
> > > John,
> > >
> > > It's not as easy as you think. To run a debugger session, you
have
> to
> > > also have access to the original source as well to match up with the
IL
> > > being run.
> > >
> > > In order to debug, you will have to hook into the runtime itself,
> > which
> > > can be done, but it is NO small task. You would have to implement
> > > everything yourself, there is no pre-defined module/package/class for
> this
> > > (at least in the framework).
> > >
> > > Hope this helps.
> > >
> > >
> > > --
> > > - Nicholas Paldino [.NET MVP]
> > > - nicholas.paldino@exisconsulting.com
> > >
> > > "John" <john_w_john2001NOSPAMNOSPAM@yahoo.com> wrote in message
> > > news:OtH83lcICHA.1712@tkmsftngp08...
> > > > How do I make use of the .NET Debugger in my application? For
example,
> > my
> > > > application hosts other assemblies (implement IMyAppInterface). I
want
> > to
> > > > provide users the capability to debug thier assemblies while running
> in
> > > the
> > > > context of my application.
> > > >
> > > > Would I just make the Debugger attach to my application process? any
> > other
> > > > way of invoking the debugger from application? (e.g.
> > > > InvokeDebugger(LoadedAssembly)?
> > > >
> > > > Thx
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Nicholas Paldino [.NET/C# MVP]

7/2/2002 4:42:00 PM

0

Tim,

You probably could (it would be a pain in the a$$, and messy on top of
that to intercept the console streams), but I think that the original poster
wanted something more along the lines of the VS.NET debugger (with a graphic
interface) as opposed to the command line interface.

--
- Nicholas Paldino [.NET MVP]
- nicholas.paldino@exisconsulting.com

"Tim Dawson" <tim.dawson1@ntlworld.com> wrote in message
news:#ip3XYdICHA.2604@tkmsftngp11...
> Surely you could implement a debugger by starting the cordbe.exe process
and
> controlling it via stdio?
>
> Tim
>
> "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldino@exisconsulting.com>
wrote
> in message news:ejDuATdICHA.1180@tkmsftngp09...
> > John,
> >
> > Look at the section of the .NET framework documentation titled
> "Runtime
> > Debugger (Cordbg.exe)", located at (watch for line wrap):
> >
> >
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/c...
> > l/cpgrfruntimedebuggercordbgexe.asp
> >
> > The source code for cordbg.exe was shipped with the framework I
> believe,
> > and you can use that as an example of how to hook up to the runtime.
> >
> >
> > --
> > - Nicholas Paldino [.NET MVP]
> > - nicholas.paldino@exisconsulting.com
> >
> >
> > "John" <john_w_john2001NOSPAMNOSPAM@yahoo.com> wrote in message
> > news:uImpO8cICHA.1120@tkmsftngp13...
> > > Thanks Nicholas. Yes, we are assuming we have access to the source.
Any
> > > pointers/directions on how to go about this?
> > >
> > > Thx.
> > >
> > > "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldino@exisconsulting.com>
> > wrote
> > > in message news:uuBDyscICHA.2580@tkmsftngp09...
> > > > John,
> > > >
> > > > It's not as easy as you think. To run a debugger session, you
> have
> > to
> > > > also have access to the original source as well to match up with the
> IL
> > > > being run.
> > > >
> > > > In order to debug, you will have to hook into the runtime
itself,
> > > which
> > > > can be done, but it is NO small task. You would have to implement
> > > > everything yourself, there is no pre-defined module/package/class
for
> > this
> > > > (at least in the framework).
> > > >
> > > > Hope this helps.
> > > >
> > > >
> > > > --
> > > > - Nicholas Paldino [.NET MVP]
> > > > - nicholas.paldino@exisconsulting.com
> > > >
> > > > "John" <john_w_john2001NOSPAMNOSPAM@yahoo.com> wrote in message
> > > > news:OtH83lcICHA.1712@tkmsftngp08...
> > > > > How do I make use of the .NET Debugger in my application? For
> example,
> > > my
> > > > > application hosts other assemblies (implement IMyAppInterface). I
> want
> > > to
> > > > > provide users the capability to debug thier assemblies while
running
> > in
> > > > the
> > > > > context of my application.
> > > > >
> > > > > Would I just make the Debugger attach to my application process?
any
> > > other
> > > > > way of invoking the debugger from application? (e.g.
> > > > > InvokeDebugger(LoadedAssembly)?
> > > > >
> > > > > Thx
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>