{"id":6508,"date":"2015-11-11T15:10:21","date_gmt":"2015-11-11T14:10:21","guid":{"rendered":"http:\/\/www.centigrade.de\/blog\/?p=6508"},"modified":"2020-01-25T19:38:57","modified_gmt":"2020-01-25T18:38:57","slug":"many-small-improvements-visual-studio-2015","status":"publish","type":"blog","link":"https:\/\/www.centigrade.de\/en\/blog\/many-small-improvements-visual-studio-2015\/","title":{"rendered":"Many small improvements \u2013 Visual Studio 2015"},"content":{"rendered":"<p>Visual Studio 2015\u00a0has some new features for developers. This raises the question: Which of the new features will help making my\u00a0life as\u00a0developer easier? And which features could be left out?<!--more--><\/p>\n<h3>Visual Studio 2015 has no\u00a0&#8220;Killer&#8221;-Feature<\/h3>\n<p>In this post I would like to tell you about the new features of Visual Studio 2015 and how they will make my work as a developer a little bit easier.\u00a0It should be said that the new version of Visual Studio does not contain that one new big feature everyone was waiting for.\u00a0Although Visual Studio 2015 is using the new and faster <a href=\"https:\/\/en.wikipedia.org\/wiki\/.NET_Compiler_Platform\" target=\"_blank\" rel=\"noopener noreferrer\">Roslyn compiler<\/a> without which some features would not be possible at all, this is in many cases not directly visible and therefore noticeable for the end user.\u00a0On the other hand lots of small changes there have been made which will make the work with Visual Studio and Blend a lot simpler.<\/p>\n<h4>Intuitive use of\u00a0breakpoints<\/h4>\n<p>I would like to start with the possibility of defining conditions for breakpoints. The functionality has not changed much, since I was already able to define conditions in the previous version. However, this can now be done by hovering over the breakpoint instead of right clicking to open a new dialog. Although it is not much of a change, it feels easier and more intuitive than before.<\/p>\n<p>Another change concerning breakpoints can be found when debugging. When a program stops at a breakpoint, Visual Studio displays the elapsed time since the last breakpoint. This can be very helpful for smaller performance questions because I can easily see where the most time was spent without starting an entire performance analysis.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6463 size-full\" src=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Elapsed-Time-At-Breakpoints.png\" alt=\"Elapsed-Time-At-Breakpoints\" width=\"784\" height=\"241\" srcset=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Elapsed-Time-At-Breakpoints.png 784w, https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Elapsed-Time-At-Breakpoints-300x92.png 300w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/p>\n<h4>Code Editor\u00a0revised<\/h4>\n<p>Moreover, the information of the CodeLens feature will be shown in the code editor. CodeLens already existed in Visual Studio 2013 but was only available in the Ultimate Edition. With the new version it will also be available in the Professional Edition.\u00a0The number of references to a function or property will be displayed above those and a mouse click will reveal additional information. I can also see which unit tests call this function and I can run those tests without having to switch to the Test Explorer.<\/p>\n<p>Microsoft also changed the Team Activity View which shows the code history in a clear visualization. I can now directly see at which point in time a developer made changes to a function or class and it is also possible to compare the code with an earlier version directly in the code editor.<\/p>\n<p>Many of those functionalities are not new, but they are displayed more clearly and the relevant information is accessible more easily. Therefore it is easier for me to use those features effectively.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6465\" src=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Function-References-Overview.png\" alt=\"Function-References-Overview\" width=\"446\" height=\"218\" srcset=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Function-References-Overview.png 446w, https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Function-References-Overview-300x147.png 300w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/p>\n<h3>Better to copy well than invent badly<\/h3>\n<p>With this motto Microsoft tried to integrate functionalities that have already been invented by other vendors into Visual Studio.\u00a0In WPF applications I can now see the visual tree. The properties of each FrameworkElement can be viewed and edited in the Live Property Explorer. I used to use the tool <a href=\"https:\/\/snoopwpf.codeplex.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Snoop <\/a>for these purposes but now these features are already included in Visual Studio.\u00a0When I select an element in the Live Visual Tree I can now jump straight to the place where this element is defined in the code. This way I will find the part I was looking for a bit faster than before.<\/p>\n<p>With the small lightbulb popping up when Visual Studio suggests improvements in the code, Microsoft tries to mimic the highly popular extension <a href=\"https:\/\/www.jetbrains.com\/resharper\/\" target=\"_blank\" rel=\"noopener noreferrer\">ReSharper <\/a>which is essential for many developers.\u00a0I can now take a look at a preview of the suggested changes when I hover over a suggestion with the mouse. This is very good for more complex changes since it helps me to understand what is actually going to happen.\u00a0Unfortunately Microsoft does not provide as many suggestions as the <a href=\"https:\/\/www.jetbrains.com\/resharper\/\" target=\"_blank\" rel=\"noopener noreferrer\">ReSharper <\/a>does. Therefore I will not dismiss my ReSharper right away \u2013 and I guess many developers won\u2019t either.\u00a0We will have to wait and see how this situation develops but I expect Microsoft to come up with more improvements in this area in the near future.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6466\" src=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Lightbulp-Preview.png\" alt=\"Lightbulp-Preview\" width=\"736\" height=\"233\" srcset=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Lightbulp-Preview.png 736w, https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Lightbulp-Preview-300x95.png 300w\" sizes=\"auto, (max-width: 736px) 100vw, 736px\" \/><\/p>\n<h3>IntelliTest \u2013 a replacement for unit tests?<\/h3>\n<p>Another new feature that sounds very interesting is the IntelliTest because it automatically generates unit tests for the current class or function. All possible code paths are checked and test data is generated to enable maximum code coverage.\u00a0At first, this sounds pretty amazing, but it should be used carefully. Even if the code is covered the test data is generated randomly, since the program does not know the logical sense behind the test. Additionally, I often write unit tests before actually implementing a function. This way I can see potential errors while implementing. Therefore I will still have to write unit tests myself. Nevertheless this tool can be helpful: It might expose test cases I forgot.\u00a0So this feature is definitely worth taking a look at. Unfortunately it will only be available in the Enterprise version of Visual Studio 2015, and therefore cannot be used by all developers.<\/p>\n<h3>A better\u00a0Blend<\/h3>\n<p>In Blend things also changed and got better, mainly because Blend now uses the Visual Studio shell. This leads to the visual design now resembling Visual Studio itself more. Blend\u2019s project explorer has been replaced by the one Visual Studio uses and can now be used more easily.\u00a0The biggest change in Blend is the new code editor, which is also the same as in Visual Studio. This enables code highlighting and IntelliSense, which makes working with XAML files in Blend a lot easier. This feature is not really new because it was already part of Visual Studio. However, if you compare this to the old code editor of Blend, it is a huge leap towards better usability.<\/p>\n<p>The peek feature was submitted to a few changes as well. I can now directly see the origin of XAML elements and resources without leaving the current context. When I click on a resource and press Alt + F12 a small window pops up in which I can edit this resource. This inline window was accessible before but I was not able to edit the content inside it until now.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6467\" src=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Peek-Window.png\" alt=\"Peek-Window\" width=\"1041\" height=\"346\" srcset=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Peek-Window.png 1041w, https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Peek-Window-300x100.png 300w, https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Peek-Window-1024x340.png 1024w\" sizes=\"auto, (max-width: 1041px) 100vw, 1041px\" \/><\/p>\n<p>Regarding XAML code itself a very basic change was made, polarizing the developer community: it is now possible to define regions in XAML, like they are known from C#. Personally I like this new feature since it will help me structure very large and complex files more easily. However, there are developers who do not like this possibility. Maybe because the regions must be wrapped into comments, which fells un-intuitive, or because they may hide important aspects unintentionally.<\/p>\n<p>Another small feature with big impact can be found while switching from Visual Studio to Blend and vice versa. Until now I was always asked to apply my changes when I edited something in the other program. Now I can set a tiny but important checkmark, which will cause my decision to be remembered, and prevent the obtrusive dialog from appearing ever again.<\/p>\n<p>Another important new feature is the Timeline tool, which does a precise performance analysis of the user interface and replaces the previous XAML UI Responsiveness Tool. With this tool I can see exactly where time is spent in the UI thread, und where possible bottlenecks might be. The use of this tool is very intuitive and simple. When I start a diagnose session, data like CPU and GPU usage, or the framerate, is collected at runtime. The data is very well-arranged, so that the relevant actions in the graph can be filtered, enabling me to see exactly what happens when.<\/p>\n<p>The problem is, that the feature is only supported on systems with Windows 8.1 or higher. Developers still using Windows 7 will not be able to use the tool.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6468\" src=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Timeline-Tool-Analysis-1024x572.png\" alt=\"Timeline-Tool-Analysis\" width=\"775\" height=\"433\" srcset=\"https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Timeline-Tool-Analysis-1024x572.png 1024w, https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Timeline-Tool-Analysis-300x168.png 300w, https:\/\/www.centigrade.de\/wordpress\/wp-content\/uploads\/Timeline-Tool-Analysis.png 1210w\" sizes=\"auto, (max-width: 775px) 100vw, 775px\" \/><\/p>\n<h2>Conclusion:<\/h2>\n<p>By applying many small changes Microsoft has made Visual Studio 2015 more comfortable to work with.\u00a0Having turned out not to be the long-awaited one super-improvement, I have still already incorporated all the small advances into my day-to-day, and would not want to work without them anymore.<\/p>\n<p>However, I am a little disappointed, that not all of the <a href=\"https:\/\/www.jetbrains.com\/resharper\/\" target=\"_blank\" rel=\"noopener noreferrer\">ReSharper <\/a>functionalities have been provided. But Microsoft does seem to be moving in the right direction \u2013 even if only taking small steps forward at a time.<\/p>\n","protected":false},"author":44,"featured_media":0,"template":"","tags":[42,155,456],"class_list":["post-6508","blog","type-blog","status-publish","hentry","tag-blend","tag-design-engineering","tag-visual-studio"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.centigrade.de\/en\/wp-json\/wp\/v2\/blog\/6508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.centigrade.de\/en\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.centigrade.de\/en\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.centigrade.de\/en\/wp-json\/wp\/v2\/users\/44"}],"version-history":[{"count":0,"href":"https:\/\/www.centigrade.de\/en\/wp-json\/wp\/v2\/blog\/6508\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.centigrade.de\/en\/wp-json\/wp\/v2\/media?parent=6508"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.centigrade.de\/en\/wp-json\/wp\/v2\/tags?post=6508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}