Best way to understand a new library
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Best way to understand a new library

  1. #1
    Join Date
    Sep 2014
    Posts
    3

    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

  2. #2
    Join Date
    Sep 2014
    Posts
    3

    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.

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,359

    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.

  4. #4
    Join Date
    Sep 2014
    Posts
    3

    Re: Best way to understand a new library

    Quote Originally Posted by Arjay View Post
    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?

  5. #5
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,359

    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.

  6. #6
    Join Date
    Apr 2014
    Location
    in northeast ohio
    Posts
    83

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center