Troubleshoot Implement new functionality Improve code health.

35

Transcript of Troubleshoot Implement new functionality Improve code health.

Page 1: Troubleshoot Implement new functionality Improve code health.
Page 2: Troubleshoot Implement new functionality Improve code health.

Get the most of your Code MapsJean-Marc PrieurSenior Program ManagerMicrosoft – Visual Studio

DEV-B373

Page 3: Troubleshoot Implement new functionality Improve code health.

By the end of this talk, you will understand …Why use Code Map ?

3 scenarios around understanding code

How to use it better ?Entry points and featuresRecipes, how-to, community extensions

The future of Code MapOur plans moving forward

Bonus: Code IndexThe underlying Code IndexLeverage the Code Index SDK

Mostly

demos

Page 4: Troubleshoot Implement new functionality Improve code health.

Scenarios

Page 5: Troubleshoot Implement new functionality Improve code health.

Plan

Implement

Diagnose

BugFeature

TroubleshootImplement new functionality

Improve code healthEnduring developer scenarios

Page 6: Troubleshoot Implement new functionality Improve code health.

Demo

Find and fix the root cause of an issue with Debugger Map and Code Map

Page 7: Troubleshoot Implement new functionality Improve code health.

Demo

Change an API to support new feature workAdd a property to an interface. Understand the cost of refactoring, and do the work

Page 8: Troubleshoot Implement new functionality Improve code health.

Demo

Understand dependencies and remove unwanted dependencies to improve the application health(with a solution)

Page 9: Troubleshoot Implement new functionality Improve code health.

Demo

Componentize to improve the application health (without a solution)

Page 10: Troubleshoot Implement new functionality Improve code health.

Recipes and how-to

Page 11: Troubleshoot Implement new functionality Improve code health.

Points

Entry

Code Editor

Architecture menu

Debugger

Drag + Drop binaries from file Explorer

Solution explorerDrag + Drop

Open IntelliTrace file

Code MapDGML

Diagram

Navigate in the view

mouse, keyboard

Extend selection

Group

Layout (per group)

Edit (hide, add generic nodes, links)

Highlight

Save

Export as a picture

Email

Paste or drag and dropto Layer diagram to enforce

dependencies

Schema

Styling(legend)

Actions

Dependency links are fetched automatically

Navigate to code from nodes

Show Related elements

Page 12: Troubleshoot Implement new functionality Improve code health.

Points

Entry

Code Editor

Architecture menu

Debugger

Drag + Drop binaries from file Explorer

Solution explorerDrag + Drop

Open IntelliTrace file

Code MapDGML

Diagram

Navigate in the view

mouse, keyboard

Extend selection

Group

Layout (per group)

Edit (hide, add generic nodes, links)

Highlight

Save

Export as a picture

Email

Paste or drag and dropto Layer diagram to enforce

dependencies

Schema

Styling(legend)

Actions

Dependency links are fetched automatically

Navigate to code from nodes

Show Related elements(inheritance trees and method overrides)

Tip: ASP .Net MVC

Show Related elements(inheritance trees and method overrides)

Schema

Styling(legend)

Navigate in the view

mouse, keyboard

Page 13: Troubleshoot Implement new functionality Improve code health.

Demo

Recipes

Page 14: Troubleshoot Implement new functionality Improve code health.

Future plans

Page 15: Troubleshoot Implement new functionality Improve code health.

Points

Entry

Code Editor

Architecture menu

Debugger

Drag + Drop binaries from file Explorer

Solution explorerDrag + Drop

Open IntelliTrace file

Code MapDGML

Diagram

Navigate in the view

mouse, keyboard

Extend selection

Group

Layout (per group)

Edit (hide, add generic nodes, links)

Highlight

Save

Export as a picture

Email

Paste or drag and dropto Layer diagram to enforce

dependencies

Schema

Styling(legend)

Dependency links are fetched automatically

Navigate to code from nodes and links

Show Related elements

, Class View, Object Browser

Filtering

Preset of useful diagramsand links

Compact representation

Higher level diagrams

Page 16: Troubleshoot Implement new functionality Improve code health.

Code index SDK

Page 17: Troubleshoot Implement new functionality Improve code health.

Demo

Where is the Code index database ?

Page 18: Troubleshoot Implement new functionality Improve code health.

Why use the Code Index SDK?

Pre index binaries on my machine

Leverage the indexed information

To be more productive when I use thedependency graphs

In order to feed it into in-house tools that make me more productive.

Who shall I break if I do this change ?

Are my tests clean ?

Page 19: Troubleshoot Implement new functionality Improve code health.

Bulk indexing : using the code index Sdk

How to install it?

What does it bring?

http://code.msdn.microsoft.com/vsvmsdk

Visual Studio 2013 Ultimate

Visual Studio 2013 SDK

Visual Studio 2013 Modeling SDK

Page 20: Troubleshoot Implement new functionality Improve code health.

Demo

Pre-indexing a folder

Page 22: Troubleshoot Implement new functionality Improve code health.

Demo

Using the code index sdk to find de-activated tests without a workitem

Page 23: Troubleshoot Implement new functionality Improve code health.

Breakout Sessions FDN04 Modern Application Lifecycle Management

DEV-B352 Debugging Tips and Tricks in Visual Studio 2013

DEV-B222 Rapidly Detect Application Outages with Visual Studio Online Application Insights

Related content

Microsoft Solutions Experience Location (MSE)Developer Tools: Application Lifecycle Management & DevOps, MSE – Server Cloud Tools

Find Me Later At :Application Lifecycle Management & DevOps MSE.

Page 24: Troubleshoot Implement new functionality Improve code health.

Visit the Developer Platform & Tools BoothHaving a friend buy your coffee?Yea, it’s kind of like that.

MSDN Subscribers get up to $150/mo in Azure credits.

Stop by the Developer Platform and Tools booth and visit the MSDN Subscriptions station to activate your benefits and receive a gift!

http://aka.ms/msdn_teched

3 Steps to New Gear! With Application Insights

1. Create a Visual Studio Online account http://visualstudio.com

2. Install Application Insights Tools for Visual Studio Online http://aka.ms/aivsix

3. Come to our booth for a t-shirt and a chance to win!

VSIP QR Tag Contests Visit our booth to join the hunt for cool prizes!

Page 25: Troubleshoot Implement new functionality Improve code health.

ResourcesMicrosoft Engineering Stories

How Microsoft Builds Softwarehttp://aka.ms/EngineeringStories

Visual Studio Industry Partner Program

Meet Our New Visual Studio Online Partners or Join Now.http://vsipprogram.com

Visual Studio | Integrate

Create Your Own Dev Environmenthttp://integrate.visualstudio.com

Development tools & services for teams of all sizeshttp://www.visualstudio.com

Page 26: Troubleshoot Implement new functionality Improve code health.

Complete an evaluation and enter to win!

Page 27: Troubleshoot Implement new functionality Improve code health.

Evaluate this session

Scan this QR code to evaluate this session.

Page 28: Troubleshoot Implement new functionality Improve code health.

© 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 29: Troubleshoot Implement new functionality Improve code health.

Appendix slides

Page 30: Troubleshoot Implement new functionality Improve code health.

“ Out of intense complexities intense simplicities emerge.”

Winston Churchill

Page 31: Troubleshoot Implement new functionality Improve code health.

Code Map ScenariosIn an ASP. Net MVC app:Find and fix the root cause of an issueStart from an issue in production, download IntelliTrace, find the problem with Debugger Map

Change an API to support new feature workAdd a property to an interface. Understand the cost of refactoring, and do the work

Remove dependencies to improve the application healthUnderstand dependencies with respect to a technological layer and refactor to remove unwanted dependencies.

Page 32: Troubleshoot Implement new functionality Improve code health.

Recap: Find and fix with Debugger Map

Use Debugger map to: Understand a bug Plan the fix

Featuring:Opening a solution from Application Insight

New parameter links in debugger map (update 2)

Improved zoom experience (update 3)

Page 33: Troubleshoot Implement new functionality Improve code health.

Recap: Refactoring with Code Map

Use Code map to:Cost the feature workDo the change using the map as a code companion, offloading your memory

Featuring:Questions from the code editor

Questions from the graph

Links styling (Update 2)

Page 34: Troubleshoot Implement new functionality Improve code health.

Scenario: Coarse grain refactoring

Use dependency graphs to:Understand the dependenciesChange them without introducing cycles or unwanted dependencies

Page 35: Troubleshoot Implement new functionality Improve code health.

Bulk indexing assemblies into the code index

<?xml version="1.0" encoding="utf-8" ?>

<Project DefaultTargets="LoadArtifacts" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!-- Custom project file to load all of the assemblies and executables in the same folder as the project file. Note that the "DefaultTargets" property has been set above to "LoadArtifacts". -->

<PropertyGroup>

<!-- Change the database into which the data will be loaded. -->

<Repository>Dev12</Repository>

<RepositoryServer>(localdb)\v11.0</RepositoryServer>

</PropertyGroup>

<ItemGroup>

<!-- Specify the artifacts to load -->

<ArtifactsToLoad Include="C:\Program Files(x86)\Microsoft Visual Studio 12.0\**\*dll" />

</ItemGroup>

<!-- Import the core Repository tasks and targets-->

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\Repository\Microsoft.Repository.targets"/>

</Project>