Msdevcon.ru#msdevcon. ИЗ ПЕРВЫХ РУК: ДИАГНОСТИКА ПРИЛОЖЕНИЙ С ПОМОЩЮ ИНСТРУМЕНТОВ VISUAL STUDIO 2012 MAXIM GOLDIN Senior Developer, Microsoft.

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Preface Demo A Quick Thank You How Did We Do It?
Windows 8 (1) (2) (3) Windows 8 (1) (2) (3)
Parallel Performance Tools in Visual Studio 2010.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
04b | Manage Test Execution (2 of 2) Steven Borg | Co-founder & Strategist, Northwest Cadence Anthony Borton | ALM Consultant, Enhance ALM.
Configuring PHP on IIS7 Making your application rock on IIS7 Taking advantage of the Windows platform Q&A at Open Space.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Node.js on Windows Azure Name Title Microsoft Corporation.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
A Windows Azure application runs multiple instances of each role A Windows Azure application behaves correctly when.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Feature: Employee Self Service Timecard Entry © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
03 | Manage Team Foundation Server Steven Borg | Co-founder & Strategist, Northwest Cadence Anthony Borton | ALM Consultant, Enhance ALM.
Feature: Void Historical/Open Transaction Updates © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
06 | Debugging and Deploying on Azure Stacey Mulcahy | Technical Evangelist Rami Sayar | Technical Evangelist.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
04 | Business Analyzer Brian Meier| Senior Lead Program Manager.

No Mixed Mode Debugging Support Use Multiple Instances Instead Launch the app under the script debugger Attach with the native debugger from.
Msdevcon.ru#msdevcon. ИЗ ПЕРВЫХ РУК: КАК СДЕЛАТЬ ВАШ КОД БЫСТРЫМ ПРОФАЙЛИНГ КЛИЕНТСКИХ И СЕРВЕРНЫХ ПРИЛОЖЕНИЙ В VISUAL STUDIO 2012 MAXIM GOLDIN Senior.
MIX 09 5/29/ :31 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Manual testing of Windows Metro style apps built using HTML
DotnetConf 11/14/2018 8:22 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
Microsoft Build /24/2018 4:02 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
MIX 09 11/24/2018 9:18 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Tooling and Diagnostics
Release Management with Visual Studio Team Services
Working with different JavaScript frameworks and libraries
Super Charge Your Debugging in Visual Studio
Title of Presentation 12/2/2018 3:48 PM
Microsoft Build /6/2018 4:22 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
TechEd /7/2018 9:56 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Office 365 Development.
Understand design from code with code maps
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Build /4/ Diagnosing issues with Windows Phone 8.1 JavaScript apps using Visual Studio Andy Sterland Senior Program
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
Using Smart Unit Tests to find bugs earlier in the development cycle
Advanced app and driver debugging
Presentation transcript:

msdevcon.ru#msdevcon

ИЗ ПЕРВЫХ РУК: ДИАГНОСТИКА ПРИЛОЖЕНИЙ С ПОМОЩЮ ИНСТРУМЕНТОВ VISUAL STUDIO 2012 MAXIM GOLDIN Senior Developer, Microsoft

Agenda  Diagnostics in Production  Remote Debugger  IntelliTrace  Dump Debugger  Diagnostics of Client Applications  First Chance Exceptions in C++  Mixed-language  Contracts  Background tasks  Installed apps without VS project

Challenges in Production  Can’t reproduce the issue in a development environment  Can’t run Visual Studio on the production machine  Possibly very limited developer access to production machines  Want to minimize impact to the server  Performance  Availability  Security

Remote Debugger: The Big Hammer  Advantages  Often the fastest way to resolve an issue  Easy installation  Remote Tools  Xcopy deployable (%ProgramFiles%\Microsoft Visual Studio\Common7\IDE\Remote Debugger)  Configurable Authentication  Disadvantages  Your service becomes unresponsive if you are stopped in the debugger  Requires some firewall configuration

Remote Debugger TCP/IP

DEMO Remote Debugger

Improvements in Visual Studio 2012  Single Firewall Configuration (Remote Debugger Side)  Can connect across different domains  Symbols load from the Visual Studio side  No need to copy symbol files to your production machine  Faster  No need to choose between x86 and x64

IntelliTrace  A “Back-in-Time” debugger  Configurable logging to trace the state of an application through its execution history  Integrated with the Visual Studio Debugger UI for analysis  Can be run either locally or via command line

IntelliTrace Collection Plans  2 Default Levels  Events  Calls  Custom?  Can turn individual events on/off  Can include/exclude modules  Change max log file size  Requires Editing XML  lintellitrace/ lintellitrace/

IntelliTrace in Production  Download the IntelliTrace Collector   Run it on your production machine  Pick a collection plan  Target the application  Reproduce the issue  Bring the IntelliTrace log back to your development machine  Analyze in Visual Studio to find the bug

DEMO IntelliTrace In production

Impact on Server Performance  Depends on a number of factors  Number of events collected  Number of modules included in application (startup jitting costs)  Calls data collection  IO

Dump Files  Snapshots of the application at a single point in time  Two major types  With Heap – allows full inspection of the state of the app at that point in time  Without Heap – only allows for inspection of the call stacks across all threads  Can be opened directly in VS and debugged just like a regular application  Except no stepping…

Creating Dump Files in Production  Several tools available, including Visual Studio  ProcDump has many qualities that make it ideal for production use  Command line  Xcopy deployable  Provides triggers for dump collection  CPU usage, Memory usage, Exceptions (with filters)  Low impact on system performance  Available through Microsoft SysInternals: us/sysinternals/dd aspxhttp://technet.microsoft.com/en- us/sysinternals/dd aspx

DEMO ProcDump In production

Symbols (PDBs)  The debugger and IntelliTrace all need symbols to function properly  Symbols provide a mapping between the binaries you are analyzing and the source code that produced them  Also provide information for determining the local variables for a function  Symbol files must exactly match the build that you are diagnosing  It is easy for your development environment to get out of sync with what is in production

Agenda  Diagnostics in Production  Remote Debugger  IntelliTrace  Dump Debugger  Diagnostics of Client Applications  First Chance Exceptions in C++  Mixed-language  Contracts  Background tasks  Installed apps without VS project

First Chance Exception Tough to find your real error in XAML apps Turning on first chance exceptions can create a lot of noise that can slow you down Async patterns can make this worse

DEMO FIRST CHANCE EXCEPTION

First Chance Exception Stop on Originate Error Exceptions for C++ Use the memory window on the third parameter to decode the secret message

Native/Managed Debugging for Store Apps  Remote Debugging  Native Visualization  Reliable Stepping  Shipped in Update 1

Mixed-language I have options for “Native Only” and “Script Only” debugging. What if I want to do both?

DEMO DEBUGGING NATIVE AND JAVASCRIPT

Debugging Native and JavaScript  No Mixed Mode Debugging Support  Use Multiple VS Instances Instead  Launch the app under the script debugger  Attach with the native debugger from a second instance of VS  Visual Studio naturally gives focus to the correct instance  Cannot Debug JavaScript when stopped in the native debugger

Contract Debugging  Windows 8 contracts provide a new entry point for applications  It’s not the same code as just launching under the debugger  Simply attaching is not quick enough as you may have missed the code that you wanted to debug

DEMO CONTRACT DEBUGGING

Contract Debugging  Configure the app to debug without launch in the project properties  F5 the app  Invoke your application manually through the contract

Background Tasks  Your app can register to run background tasks when certain events happen  Some background tasks are straight forward to test and debug because you can trigger them manually  Others can be a much bigger pain  Like a maintenance trigger that fires after 8 hours

DEMO BACKGROUND TASK DEBUGGING

Background Tasks  Trigger background tasks from the Debug Location Toolbar  Can trigger tasks on apps that are not running  Set them to debug without launching first  Can trigger tasks that do not require a payload

No Projects  There are several reasons why you may not have a VS project, but still want to debug  Permissions  Convenience  Normally build/deploy outside of VS  Attach to process is a pain for WWAs  Especially if you need to debug startup code!

DEMO NO PROJECT DEBUGGING

No Projects  Use the “Debug Installed App Package Feature”  Works both local and remote  Can automatically stop at the first line of JavaScript Code

Agenda  Diagnostics in Production  Remote Debugger  IntelliTrace  Dump Debugger  Diagnostics of Client Applications  First Chance Exceptions in C++  Mixed-language  Contracts  Background tasks  Installed apps without VS project

More Info, Request Features Maxim Goldin : ALM Team Blog: Uservoice site:

© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.