-
September 25th, 2014, 07:42 PM
#1
Best way to understand a new library
Hi,
I am currently struggling to understand a new C# library. I currently using the debugger to see the flow of code and value of variables inside methods. There are a lot of loops and if/else branches.
However I also would like to understand the big picture. For that I would like to get something like a nice execution diagram (maybe even with times spend in a certain method).
If it's not possible to visualize it, I would settle with simply a 'list' of executed methods in the sequence they are called.
I am also open and thankful for any other approaches that help me understand this library (just reading the documentation is not cutting it).
I am relatively new to Visual Studio 2010 so maybe this is a stupid question but Google didn't really find me what I am looking for. I am open to any suggestions
Cheers,
sb
-
September 26th, 2014, 01:16 PM
#2
Re: Best way to understand a new library
I read about the Visual Studio Profiler. It is just for Performance Profiling, correct? Maybe this is I tool I could use (I don't have it installed now).
I just want to be able to press a button and record all method calls (and possibly the time spend in each method) as a list of execution flow or even better as a visualization where I see how the code is executed after pressing the button.
-
September 26th, 2014, 01:33 PM
#3
Re: Best way to understand a new library
You can use the profiler to get the execution times. You can also add a Class Diagram to the project and drag in the classes from the assembly. This will give you diagram of the class and method relationships.
-
September 26th, 2014, 05:25 PM
#4
Re: Best way to understand a new library
Originally Posted by Arjay
You can use the profiler to get the execution times. You can also add a Class Diagram to the project and drag in the classes from the assembly. This will give you diagram of the class and method relationships.
I already did a class diagram but it didn't help me really to understand the code.
I don't have a Profiler (maybe I don't have it installed - with Visual Studio 2010 is there an installer?).
Any other way besides the installer?
-
September 26th, 2014, 07:30 PM
#5
Re: Best way to understand a new library
The profiler comes with non-express versions of Visual Studio.
Stepping through the code may be your best bet.
-
September 28th, 2014, 10:20 PM
#6
Re: Best way to understand a new library
if the library is using the a older version then .net 4.5
you can probably still use the CLR profiler from microsoft
which is standalone to get a better picture of whats going on
http://www.microsoft.com/en-us/searc...ateorder=1_5_2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|