Home All Groups Group Topic Archive Search About

Tracing framework code

Author
14 Aug 2006 8:30 PM
Maxim
Hello, everybody.

Can I trace framework code while debugging my application. For example I'd
like to find out how BindingSource processes OnChange event because I'm
experiencing problems with it and I don't understand how it works exactly.
Can I set a breakpoint to catch the moment, when BindingSource changes its
Current property, or probably there are other ways to trace its behaviour
under debugger?

Thanks in advance.

Author
14 Aug 2006 8:55 PM
Kevin Spencer
Hi Maxim,

You've asked for a mouthful, there. The .Net Tracing mechanisms are highly
extensible. Of course, this adds a bit to their complexity. But you can do
all kinds of variations of tracing, using several classes in the
System.Diagnostics Namespace.

Here are a couple of good articles to get you started:
http://www.15seconds.com/issue/020910.htm
http://www.codeguru.com/Csharp/.NET/net_general/netframeworkclasses/article.php/c8373/

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Orange you bland I stopped splaying bananas?

Show quote
"Maxim" <vmu [_at_] mail [ _dot_ ] ru> wrote in message
news:%23u9H9B%23vGHA.4512@TK2MSFTNGP05.phx.gbl...
> Hello, everybody.
>
> Can I trace framework code while debugging my application. For example I'd
> like to find out how BindingSource processes OnChange event because I'm
> experiencing problems with it and I don't understand how it works exactly.
> Can I set a breakpoint to catch the moment, when BindingSource changes its
> Current property, or probably there are other ways to trace its behaviour
> under debugger?
>
> Thanks in advance.
>
>
Author
14 Aug 2006 9:16 PM
Chris Mullins
"Maxim" <vmu [_at_] mail [ _dot_ ] ru> wrote
> Can I trace framework code while debugging my application.

I don't know of any way to step into the code short of using an unmanaged
debugger.

The easiest solution is to download Reflector, and look at the Microsoft
code. Load in the System.Windows.Forms assembly, find the class you're
looking for, and take a long look through theOnChange Event. Reflector has
excellent features for doing this.

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
Author
15 Aug 2006 3:46 AM
Jim Wooley
Hello Chris,

>> Can I trace framework code while debugging my application.
>>
> The easiest solution is to download Reflector, and look at the
> Microsoft code. Load in the System.Windows.Forms assembly, find the
> class you're looking for, and take a long look through theOnChange
> Event. Reflector has excellent features for doing this.
>
> --
> Chris Mullins, MCSD.NET, MCPD:Enterprise
> http://www.coversant.net/blogs/cmullins

In addition, Reflector lets you drill into methods. Just click on the underlined
method like a hyperlink and it will drill in through the method calls. It
doesn't allow you to see the variable values, but you can get an idea of
what's going on at least. I continue to be amazed by the amount of code MSFT
allows us to see if we're willing to put in a little work.

Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx

AddThis Social Bookmark Button