开发者

.NET: Is it possible to log calls of .NET assembly methods?

开发者 https://www.devze.com 2022-12-28 21:49 出处:网络
Is it possible to log calls of .NET methods made while an a开发者_开发问答pplication is running?Perhpas you are interested in one of the following options:

Is it possible to log calls of .NET methods made while an a开发者_开发问答pplication is running?


Perhpas you are interested in one of the following options:

  1. Use existing profiler to visualise calls of .NET methods. It depends on profiler and their functionality but ANTS or DotTrace work just fine if you don't need something absolutely special.

  2. If you are interested in low-level implementation including heap state at the moment of the call then you might be interested in WinDBG + Sos and its tracing options (wt command). Just set breakpoints in WinDbg, run app and collect traces including low level calls.

  3. In case there is a implicit requiremt to log you can use .NET profiling API (C++) and log everything you want to or profiling API from dotTrace profiler (C#) (it is shiped with dotTrace).

    Hope it helps.


Yes. I normally use this: http://www.jetbrains.com/profiler/ (there's a free trial).


yes use postsharp. Do the 'Getting Started' tutorial, it pretty much tells you how to do what you want. Using postsharp you may 'log' method calls in any third party party assembly.


Craig,

You can try Runtime Flow (developed by me). It is a new product and can't for example catch function parameters, but its main purpose is to log calls of .NET methods made while an application is running.

Currently Runtime Flow works best with source code available, but can be configured to monitor a dll without source code.

0

精彩评论

暂无评论...
验证码 换一张
取 消