{"id":24395,"date":"2018-05-23T20:24:00","date_gmt":"2018-05-23T20:24:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/premier_developer\/?p=24395"},"modified":"2019-02-14T20:18:07","modified_gmt":"2019-02-15T03:18:07","slug":"visualize-code-with-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/visualize-code-with-visual-studio\/","title":{"rendered":"Visualize Code with Visual Studio"},"content":{"rendered":"<p>In this post, App Dev Manager <a href=\"https:\/\/www.linkedin.com\/in\/tovsen\/\">Ed Tovsen<\/a> spotlight the features and benefits of Code Maps in Visual Studio.<\/p>\n<hr>\n<p>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 <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/modeling\/visualize-code\">visualize code<\/a> allows for the following:<\/p>\n<ul>\n<li>Learn relationships between different potions of code.<\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/visualstudio\/modeling\/map-dependencies-across-your-solutions\">Map dependencies<\/a> for an entire solution.<\/li>\n<li>Understand how application modification will affect the existing code. <\/li>\n<li>Assess the coding modifications and possible risks that may result from those changes.<\/li>\n<\/ul>\n<p>The following table shows the availability of each architecture tool in Visual Studio.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap1.png\"><img decoding=\"async\" width=\"1028\" height=\"325\" title=\"codemap1\" alt=\"codemap1\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap1_thumb.png\" border=\"0\"><\/a><br>* <a href=\"https:\/\/blogs.msdn.microsoft.com\/devops\/2016\/10\/14\/uml-designers-have-been-removed-layer-designer-now-supports-live-architectural-analysis\/\">UML designers have been removed<\/a> from Visual Studio 2017 due to lack of usage within the community.<\/p>\n<h2>Code Maps<\/h2>\n<p>This blog article is a quick start for code maps, the visualization tool provided with Visual Studio. Code maps provide the following capabilities.<\/p>\n<ul>\n<li>When debugging, a code map allows a user to visually comprehend relationships within <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/modeling\/use-code-maps-to-debug-your-applications\">applications<\/a> and <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/modeling\/map-methods-on-the-call-stack-while-debugging-in-visual-studio\">methods on the call stack<\/a>.<\/li>\n<li>When executing a code review, a code map can be a tool used during the systematic examination to find vulnerabilities. <\/li>\n<li>When working with unfamiliar or legacy code, a code map provides navigation with a visual experience.<\/li>\n<\/ul>\n<p>If the <b>Architecture<\/b> 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 <b>Individual components<\/b> item. Scroll down to <b>Code tools<\/b>, check the box next to <b>Code Map<\/b>, and click on the <b>Modify<\/b> button.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap2.png\"><img decoding=\"async\" width=\"1028\" height=\"575\" title=\"codemap2\" alt=\"codemap2\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap2_thumb.png\" border=\"0\"><\/a><\/p>\n<p>In order to generate a code map for an existing solution, click on the <b>Architecture<\/b> item in the Visual Studio menu and select <b>Generate Code Map for Solution<\/b>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap3.png\"><img decoding=\"async\" width=\"644\" height=\"168\" title=\"codemap3\" alt=\"codemap3\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap3_thumb.png\" border=\"0\"><\/a><\/p>\n<p>After the code map is generated, the diagram is displayed.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap4.png\"><img decoding=\"async\" width=\"1028\" height=\"628\" title=\"codemap4\" alt=\"codemap4\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap4_thumb.png\" border=\"0\"><\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/visualstudio\/modeling\/browse-and-rearrange-code-maps\">Browse and rearrange the code map<\/a> by expanding, grouping, filtering, and drilling-down the elements within the diagram.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap5.png\"><img decoding=\"async\" width=\"1028\" height=\"691\" title=\"codemap5\" alt=\"codemap5\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap5_thumb.png\" border=\"0\"><\/a><\/p>\n<p><strong>Lastly, Visual Studio includes <\/strong><a href=\"https:\/\/docs.microsoft.com\/visualstudio\/modeling\/find-potential-problems-using-code-map-analyzers\">code map analyzers<\/a><strong> to identify complex code that could possibly be improved. <\/strong>To run the code map analyzers, click on the <b>Layout<\/b> item in the Code Map menu, click <b>Analyzers<\/b>, and select the analyzer (<b>Circular Reference Analyzer<\/b>, <b>Find Hubs Analyzer<\/b>, <b>Unreferenced Nodes Analyzer<\/b>).<strong><\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap6.png\"><img decoding=\"async\" width=\"1028\" height=\"659\" title=\"codemap6\" alt=\"codemap6\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/codemap6_thumb.png\" border=\"0\"><\/a><\/p>\n<p><strong>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.<\/strong><\/p>\n<p>Additional Information<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/visualstudio\/modeling\/scenario-change-your-design-using-visualization-and-modeling\">Scenario: Change your design using visualization and modeling<\/a><\/li>\n<li><a href=\"https:\/\/channel9.msdn.com\/Events\/Visual-Studio\/Connect-event-2015\/502\">Video: Understand design from code with Visual Studio 2015 code maps<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/blogs.msdn.com\/b\/premier_developer\/archive\/2014\/09\/15\/welcome.aspx\"><strong>Premier Support for Developers<\/strong><\/a> provides strategic technology guidance, critical support coverage, and a range of essential services to help teams optimize development lifecycles and improve software quality.&nbsp; Contact your Application Development Manager (ADM) or <a href=\"https:\/\/blogs.msdn.microsoft.com\/premier_developer\/contact-us\/\">email us<\/a> to learn more about what we can do for you.<\/p>\n<table cellspacing=\"0\" cellpadding=\"0\">\n<tbody><\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":582,"featured_media":37840,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[113],"tags":[181,3,46],"class_list":["post-24395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-code-maps","tag-team","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/24395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=24395"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/24395\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37840"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=24395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=24395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=24395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}