Debugging and troubleshooting Azure applications using Visual Studio

Slides:



Advertisements
Similar presentations
What are Access Web App What are “Apps for Office” Microsoft Access Access “Apps for Office” Value of “Apps for Office” Apps for Office How it all works.
Advertisements

Pradeep Kumar C Support Escalation Engineer Windows Azure Diagnostics Logging and Monitoring in the Cloud.
IT Operations Management
TechEd /11/2018 6:16 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Modern Application Lifecycle Management
TechEd /1/2018 7:56 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
WebView: Bringing the web to your app
Build /4/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Windows Azure Jason Olson, Program Manager 4-142
IT Operations Management
TechEd /13/2018 7:46 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
SharePoint Online Management and Control
TechEd /14/2018 6:26 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
0 to 60: Developing Apps for Microsoft Office 2013
TechEd /21/2018 5:20 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /23/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /24/2018 6:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Visual Studio 2013 for web developers
SPC2012 – IT-Pro 11/30/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Build /2/ The future of Azure devops: Building and managing cloud applications lifecycle across your teams Bradley Millington Program.
TechEd /4/2018 3:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /6/2018 8:16 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /7/2018 9:56 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Microsoft Virtual Academy
Windows Azure Web Sites & On-Premises Connectivity
Introduction to Building Applications with Windows Azure
12/9/2018 Desktop Virtualization Corey Hynes Kyle Rosenthal President Technical Lead HynesITe Inc Spider Consulting @windowspcguy.
Jim Nakashima Program Manager Cloud Tools
TechEd /11/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /11/ :21 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /11/ :54 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Windows Phone: Developer Best Practices and How to Maximize Performance
TechEd /18/ :08 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /18/ :01 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /18/2019 2:43 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
2/17/2019 7:32 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Windows Azure Web Sites & On-Premises Connectivity
Migrating your applications to Azure
2/27/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /28/2019 7:27 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Pushing Data to and from the Cloud with SQL Azure Data Sync
TechEd /3/ :48 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Sayed Ibrahim Hashimi Program Manager Microsoft Corporation
Build /10/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Tech Ed North America /12/2019 6:45 AM Required Slide
What's New in Visual Studio & Blend for XAML Developers
TechEd /11/ :25 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /23/2019 9:23 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
DevOps better together with System Center 2012 SP1 and Visual Studio
Service Template Creation from the Ground Up
Build /4/ Diagnosing issues with Windows Phone 8.1 JavaScript apps using Visual Studio Andy Sterland Senior Program
TechEd /27/2019 5:37 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Developing Windows Azure Applications with Visual Studio
Jason Zander Unplugged
Build /20/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Cloud-powered Load Testing with Team Foundation Service
5/25/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Making Windows Azure Relevant to IT Professionals
TechEd /12/ :12 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /30/2019 7:18 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
What’s New in the Visual Studio 2013 IDE
Getting Started with Team Foundation Service
Microsoft Virtual Academy
Build /24/ What's new for Azure developers in Visual Studio 2013 update 2 and Azure SDK 2.3 Dan Fernandez Principal PM
TechEd /5/2019 2:08 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
TechEd /21/2019 9:49 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Microsoft Virtual Academy
Presentation transcript:

Debugging and troubleshooting Azure applications using Visual Studio Boris Scholl Sr. Program Manager Visual Studio Azure Tools 3-547

Agenda Overview Cloud Services Windows Azure web sites Build 2013 9/20/2018 Agenda Overview Cloud Services Windows Azure Diagnostics IntelliTrace Profiling Windows Azure web sites Diagnostics Live Tracing Visual Studio Developer Desktop Summary © 2013 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.

Overview Environmental differences. Performance issues. Common issues with Azure applications. Environmental differences. What works in the Azure Emulator does not work in Azure. Performance issues. Site loads slowly. Computation takes a long time. Logical issues in code. My computation task returns a wrong result.

Cloud Services – Windows Azure diagnostics What can I use Azure Diagnostics for? Collects the following diagnostics information. Windows event logs. Performance counters. Azure logs (trace logs, infrastructure logs). IIS logs (IIS logs, failed requests logs). Crash dumps. Custom logs.

Cloud Services – Windows Azure diagnostics Build 2013 9/20/2018 Cloud Services – Windows Azure diagnostics How does it work in a developer scenario? Diagnostics.wadcfg Web/app.config Web/app.config Diagnostics.wadcfg wad-control-container © 2013 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.

Cloud Services – Windows Azure diagnostics What is the precedence of the configuration options? Diagnostics monitor precedence for configuration. BLOB storage Code Diagnostics.wadcfg Default config

Note – Azure web role architecture Keep in mind that there are two processes. MvcWebRole1 *.cspack WaIIShost.exe MvcWebRole1.dll MvcWebRole1.dll AppRoot Package w3wp.exe MvcWebRole1.dll SiteRoot MvcWebRole1.dll

Windows Azure Diagnostics in Visual Studio

Cloud Services – Windows Azure diagnostics Build 2013 9/20/2018 Cloud Services – Windows Azure diagnostics Azure diagnostics things to keep in mind! Visual Studio includes the diagnostics agent by default. If the diagnostics connection string is not changed the diagnostics data will be stored in the storage account used for publishing. Failed requests need to be setup manually in web.config. Need to add config file for RoleEnvironment diagnostics. Redeploy required if changes are made to code or config. You can avoid a full redeploy by using RoleInstanceDiagnosticManager. Tracing strategy can be tested locally by using the storage emulator. © 2013 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.

Cloud Services – IntelliTrace (Visual Studio Ultimate) What is IntelliTrace ? A debugging experience allowing you to rewind/replay program execution in the debugger. Captures WaIIShost.exe and w3wp.exe events. Great for chasing down logical errors. Great for detecting missing assemblies*. *We improved Visual Studio to detect missing assemblies during Build time. If missing assembly is detected we provide a Build warning.

Cloud Services – IntelliTrace TechReady 16 9/20/2018 Cloud Services – IntelliTrace Azure role instance IntelliTrace.exe User requests logs IntelliTrace agent Visual Studio *.itrace Polls queue every 1 second Create Agent Q GetLogs, Q1 Create Q1 and place request in agent Q *.itrace Pending Create Snapshot Upload to BLOB Upload to Visual Studio Complete Azure storage = user storage account! © 2013 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.

IntelliTrace

Cloud Services – Profiler (Visual Studio Pro) What does the profiler do? Instrumentation Records how long every method takes to execute. Useful when the app is slow/blocked waiting for another operation (call another service, database call etc.) Impacts perf of application if many short running function. Can create gigs of log files in minutes. Sampling Very lightweight. Useful for identifying inefficient algorithms.

Cloud Services – Profiler (Visual Studio Pro) What does the profiler do? TIP (Premium+ feature) Used in conjunction with instrumentation*. Records ADO.NET database queries. Resource contention data (concurrency) Detects threads waiting for other threads. Useful for detecting performance problems caused by lock contentions. *Used to work with sampling on Windows 7

Profiler

Cloud Services – IntelliTrace/profiler Things to keep in mind/tricks. Concurrency of agents CLR agents cannot run concurrently. Polling interval Polling interval can be changed. Add key <add key=" RequestPollInterval" value="00:00:10"/> to WindowsAzureDiagnosticsAgent.exe.config (C:\Program Files (x86)\Windows Azure Tools\Visual Studio 11.0\1.8\VsDiagnostics).

Azure web site – Diagnostics Build 2013 9/20/2018 Azure web site – Diagnostics Windows Azure web sites diagnostics options Site diagnostics Detailed error logging. Failed request tracing. Web server logging. Application diagnostics Produced by the web application itself. Works similar to Cloud Service diagnostics. Use System.Diagnostics.Trace class. No configuration required. © 2013 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.

Azure web site – Diagnostics Build 2013 9/20/2018 Azure web site – Diagnostics Windows Azure web sites can be enabled from the portal and Visual Studio Server Explorer Diagnostics configuration Logging level Informational Warning Error File system Stores data on web site file system Can be accessed by FTP or downloaded Storage Stores data in Windows Azure storage account In WAWSAppLogTable (similar schema as WADLogs) Streaming logs Live stream to PowerShell Window, Command Line or Visual Studio © 2013 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.

Web site diagnostics architecture Build 2013 9/20/2018 Web site diagnostics architecture How does it work in a developer scenario? Web App Azure Drive Trace Listener Azure TableTrace Listener Kudu Log streaming Azure BLOB Azure Table Storage Streamed Logs WebSite Drive © 2013 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.

Windows Azure Web Sites Diagnostics

Developer desktop preview in Azure I need to debug and troubleshoot an application and I need to set up an environment quickly. Developer desktop on Azure IaaS Supports SharePoint, Web and SQL development. Visual Studio 2013 Ultimate Preview pre-installed. SharePoint 2013 pre-installed. SQL Server 2012 Express pre-installed. Scripts to configure the environment included. Great for spinning up dev environments quickly. Can be provisioned from portal or entirely through PowerShell with AD support.

Resources http://www.windowsazure.com/en-us/develop/net/common-tasks/diagnostics/ http://www.windowsazure.com/en-us/develop/net/best-practices/troubleshooting-web-sites/

Get your goodies Acer Iconia W3, Surface Pro, and Surface Type Cover Device distribution starts after sessions conclude today (approximately 6:00pm) in the Big Room, Hall D. If you choose not to pick up your devices tonight, distribution will continue for the duration of the conference at Registration in the North Lobby.

9/20/2018 2:20 AM Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session Scan this QR code to evaluate this session and be automatically entered in a drawing to win a prize! © 2013 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.