• Visualize Code with Visual Studio



    In this post, App Dev Manager Ed Tovsen spotlight the features and benefits of Code Maps in Visual Studio.


    Systems architects have long used modeling to design the structure, behavior, and interaction of systems within an organization. Modeling helps to ensure that requirements are clearly defined between users and IT. Models are created with varying levels of detail throughout the application lifecycle and used as part of the development process. Typically, modeling tools assist architects in the initial stages of application conceptualize and construction. However, there are also visualization tools to comprehend existing code and find potential problems. Being able to visualize code allows for the following:

    • Learn relationships between different potions of code.
    • Map dependencies for an entire solution.
    • Understand how application modification will affect the existing code.
    • Assess the coding modifications and possible risks that may result from those changes.

    The following table shows the availability of each architecture tool in Visual Studio.

    codemap1
    UML designers have been removed from Visual Studio 2017 due to lack of usage within the community.

    Code Maps

    This blog article is a quick start for code maps, the visualization tool provided with Visual Studio. Code maps provide the following capabilities.

    • When debugging, a code map allows a user to visually comprehend relationships within applications and methods on the call stack.
    • When executing a code review, a code map can be a tool used during the systematic examination to find vulnerabilities.
    • When working with unfamiliar or legacy code, a code map provides navigation with a visual experience.

    If the Architecture item does not appear in the Visual Studio menu, please follow these steps to install code map. Execute the Visual Studio Installer and select the Individual components item. Scroll down to Code tools, check the box next to Code Map, and click on the Modify button.

    codemap2

    In order to generate a code map for an existing solution, click on the Architecture item in the Visual Studio menu and select Generate Code Map for Solution.

    codemap3

    After the code map is generated, the diagram is displayed.

    codemap4

    Browse and rearrange the code map by expanding, grouping, filtering, and drilling-down the elements within the diagram.

    codemap5

    Lastly, Visual Studio includes code map analyzers to identify complex code that could possibly be improved. To run the code map analyzers, click on the Layout item in the Code Map menu, click Analyzers, and select the analyzer (Circular Reference Analyzer, Find Hubs Analyzer, Unreferenced Nodes Analyzer).

    codemap6

    While architects are experienced using modeling tools to design systems, they may not be familiar visualizing applications that have been previously written. Code maps are that tool for understanding existing code. Architects can compare design models to actual code, and developers can debug and review code.

  • 相关阅读:
    设置表单输入框中的提示信息
    动感图文轮显
    jquery插件之图片轮显(一)整理2011.02.24
    用sort()方法对数组的元素进行排序(可按字母升序降序与获得最大最小值)
    jquery插件之图片轮显(一)
    jquery插件之图片show and hide(一)
    Pdftk The PDF Toolkit
    error while loading shared libraries: libxcbaux.so.0: cannot open shared object file
    害人的RestoreDirectory
    Oracle CASE WHEN 用法介绍
  • 原文地址:https://www.cnblogs.com/Javi/p/9114840.html
Copyright © 2020-2023  润新知