0

I want some kind of utility more like Call Stack which gives me list of all the methods/properies that are executing in the current run, something that works on realtime will be good.

Actually i am refactoring my code and wants to keep an eye on things that are not usable or things that should be avoided. I am using FxCop but that is not powerful enough to serve the purpose.

Kindly help Thanks

manav inder
  • 3,531
  • 16
  • 45
  • 62

3 Answers3

1

Sounds like you are looking for a .NET profiler.

There are several commercial offerings:

Also, see the answer to this SO question - What Are Some Good .NET Profilers?

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009
0

When I'm refactoring code I use the Obsolete-attribute a lot.

<Obsolete("Please use the better and faster MyNewSub() instead. This method still work, see info in MyNewSub on how to migrate.")> _ 
Public Sub MyOldSub()
' code.
End Sub

This way I get warnings for every function that calls this method. And every user in the project will see that the function should be avoided when coding further.

(You can also set the attribute to generate an error instead of a warning)

Maybe not an direct answer on your question, but it is a good tool when refactoring code.

Stefan
  • 11,423
  • 8
  • 50
  • 75
0

If log4net (or similar logger) are used in your project you may enable some features:

  • file name: %file
  • file line: %line
  • method name: %M

Also I tried test coverage tools (for example http://www.testdriven.net) to saw what code hadn't been used in some particular scenarios.

Rune FS
  • 21,497
  • 7
  • 62
  • 96
VMykyt
  • 1,589
  • 12
  • 17