SlideShare a Scribd company logo
1 of 21
Diagnosing issues in your ASP.NET
applications in production with Visual
Studio 2012
Brad Sullivan
brads@microsoft.com
Agenda

• Challenges in Production
• Visual Studio Tools
 •   Remote Debugger
 •   IntelliTrace
 •   Dump Debugger
 •   Profiler
• Sources and Symbols
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
    •    Xcopy deployable (%ProgramFiles%Microsoft Visual Studio
         11.0Common7IDERemote Debugger)
    •    Configurable Authentication



•       Disadvantages
    •    Your service becomes unresponsive if you are stopped in the debugger
    •    Requires some firewall configuration
Remote Debugger




                  TCP/IP
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 over time
•   Integrated with the Visual Studio Debugger UI for analysis
•   Can be run either locally or via command line
IntelliTrace in Production

•       Download the IntelliTrace Collector
           http://www.microsoft.com/en-us/download/details.aspx?id=30665
•       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
IntelliTrace Collection Plans

•       2 Default Levels
    •     Calls
    •     Events
•       Custom?
    •     Requires Editing XML
    •     Can turn individual events on/off
    •     Can include/exclude modules
    •     Change max log file size
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
System Center

• IntelliTrace is integrated with System Center 2012 SP1 – Operations
  Manager
• Application Performance Monitoring now available in an IntelliTrace
  format
• IntelliTrace Profiling Management Pack allows you to collect
  IntelliTrace logs directly from the Operations Manager console
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 callstacks 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 that can create dump files, 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:
            http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx
Performance Profiler Overview
•       CPU Sampling
    •     Shows what parts applications are executing the most frequently
•       Instrumentation
    •     Records how long functions take to execute and how many times they are
          executed
•       .NET Memory Allocation
    •     Tracks what objects are being allocated
•       Resource Contention
    •     Tracks when threads are contending for the same resource causing slowdowns
•       Tier Interaction Profiling
    •     Records database queries that go through ADO.NET
Profiling Use

•       Can be run locally from the IDE
•       Can be run in production on the command line
    •       Standalone installer included in the Visual Studio Install
        •    “VS_INSTALL_DIRECTORYTeam ToolsPerformance ToolsSetups”
•       Tier Interaction Profiling
    •       Find performance bottlenecks caused by how your application uses your
            database
    •       Is used simultaneously with another profiling method (e.g. instrumentation)
Symbols (PDBs)

• The debugger, profiler, 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
Source Indexing

•   Embeds a command into the symbol file for each source file indexed
•   Diagnostic tools execute this command to fetch the source file




                 Exact Match
Improved User Experience

                           Better configuration when
                           retrieving indexed sources
                           • Trust a whole symbol file
                           • Trust all symbol files
Using TFS Build

• Use TFS build
  definitions to save
  symbols and index
  sources
• Builds that are
  released to production
  should be saved
  indefinitely
More Info About Diagnostics

ALM Team Blog: http://blogs.msdn.com/b/visualstudioalm/
Request Features

Uservoice site: http://visualstudio.uservoice.com/

More Related Content

What's hot

Automatize everything
Automatize everythingAutomatize everything
Automatize everythingBoris Bucha
 
An Introduction to PowerShell for Security Assessments
An Introduction to PowerShell for Security AssessmentsAn Introduction to PowerShell for Security Assessments
An Introduction to PowerShell for Security AssessmentsEnclaveSecurity
 
KACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting OverviewKACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting OverviewDell World
 
Finding The Weak Link in Windows Binaries
Finding The Weak Link in Windows BinariesFinding The Weak Link in Windows Binaries
Finding The Weak Link in Windows BinariesOllie Whitehouse
 
Inventory Tips & Tricks
Inventory Tips & TricksInventory Tips & Tricks
Inventory Tips & TricksDell World
 
Sccm hands-on-lab
Sccm hands-on-labSccm hands-on-lab
Sccm hands-on-labDPA
 
Troubleshooting K1000
Troubleshooting K1000Troubleshooting K1000
Troubleshooting K1000Dell World
 
Lateral Movement with PowerShell
Lateral Movement with PowerShellLateral Movement with PowerShell
Lateral Movement with PowerShellkieranjacobsen
 
Continuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitContinuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitXebiaLabs
 
Brian Desmond - Quickly and easily protect your applications and services wit...
Brian Desmond - Quickly and easily protect your applications and services wit...Brian Desmond - Quickly and easily protect your applications and services wit...
Brian Desmond - Quickly and easily protect your applications and services wit...Nordic Infrastructure Conference
 
Enterprise PowerShell for Remote Security Assessments
Enterprise PowerShell for Remote Security AssessmentsEnterprise PowerShell for Remote Security Assessments
Enterprise PowerShell for Remote Security AssessmentsEnclaveSecurity
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practicesCode Mastery
 
Game Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentGame Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentNick Pruehs
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...The Linux Foundation
 
Master your metadata
Master your metadataMaster your metadata
Master your metadataTim Pettersen
 
Real-world Vision Systems Design: Challenges and Techniques
Real-world Vision Systems Design: Challenges and TechniquesReal-world Vision Systems Design: Challenges and Techniques
Real-world Vision Systems Design: Challenges and TechniquesYury Gorbachev
 
How to Get the Best Deep Learning performance with OpenVINO Toolkit
How to Get the Best Deep Learning performance with OpenVINO ToolkitHow to Get the Best Deep Learning performance with OpenVINO Toolkit
How to Get the Best Deep Learning performance with OpenVINO ToolkitYury Gorbachev
 

What's hot (20)

Automatize everything
Automatize everythingAutomatize everything
Automatize everything
 
An Introduction to PowerShell for Security Assessments
An Introduction to PowerShell for Security AssessmentsAn Introduction to PowerShell for Security Assessments
An Introduction to PowerShell for Security Assessments
 
KACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting OverviewKACE Agent Architecture and Troubleshooting Overview
KACE Agent Architecture and Troubleshooting Overview
 
Finding The Weak Link in Windows Binaries
Finding The Weak Link in Windows BinariesFinding The Weak Link in Windows Binaries
Finding The Weak Link in Windows Binaries
 
Inventory Tips & Tricks
Inventory Tips & TricksInventory Tips & Tricks
Inventory Tips & Tricks
 
Sccm hands-on-lab
Sccm hands-on-labSccm hands-on-lab
Sccm hands-on-lab
 
Troubleshooting K1000
Troubleshooting K1000Troubleshooting K1000
Troubleshooting K1000
 
Lateral Movement with PowerShell
Lateral Movement with PowerShellLateral Movement with PowerShell
Lateral Movement with PowerShell
 
VMware and DataSynapse
VMware and DataSynapseVMware and DataSynapse
VMware and DataSynapse
 
Continuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitContinuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and Deployit
 
Brian Desmond - Quickly and easily protect your applications and services wit...
Brian Desmond - Quickly and easily protect your applications and services wit...Brian Desmond - Quickly and easily protect your applications and services wit...
Brian Desmond - Quickly and easily protect your applications and services wit...
 
Enterprise PowerShell for Remote Security Assessments
Enterprise PowerShell for Remote Security AssessmentsEnterprise PowerShell for Remote Security Assessments
Enterprise PowerShell for Remote Security Assessments
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 
Game Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentGame Programming 08 - Tool Development
Game Programming 08 - Tool Development
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
Master your metadata
Master your metadataMaster your metadata
Master your metadata
 
Kace & SQL
Kace & SQLKace & SQL
Kace & SQL
 
Computer fundamental
Computer fundamentalComputer fundamental
Computer fundamental
 
Real-world Vision Systems Design: Challenges and Techniques
Real-world Vision Systems Design: Challenges and TechniquesReal-world Vision Systems Design: Challenges and Techniques
Real-world Vision Systems Design: Challenges and Techniques
 
How to Get the Best Deep Learning performance with OpenVINO Toolkit
How to Get the Best Deep Learning performance with OpenVINO ToolkitHow to Get the Best Deep Learning performance with OpenVINO Toolkit
How to Get the Best Deep Learning performance with OpenVINO Toolkit
 

Viewers also liked

nota lukisan persembahan senibina
nota lukisan persembahan senibinanota lukisan persembahan senibina
nota lukisan persembahan senibinaAishah Liman
 
Prinsip rekaan premis makanan
Prinsip rekaan premis makananPrinsip rekaan premis makanan
Prinsip rekaan premis makananAsif Yahya
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 1 Introduction
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 1 IntroductionArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 1 Introduction
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 1 IntroductionGalala University
 
Architectural Professional Practice - Design
Architectural Professional Practice - DesignArchitectural Professional Practice - Design
Architectural Professional Practice - DesignGalala University
 
Lukisan senibina
Lukisan senibinaLukisan senibina
Lukisan senibinastekkkt
 

Viewers also liked (8)

01 intro(prehistoric)
01 intro(prehistoric)01 intro(prehistoric)
01 intro(prehistoric)
 
The Architecture Profession
The Architecture ProfessionThe Architecture Profession
The Architecture Profession
 
nota lukisan persembahan senibina
nota lukisan persembahan senibinanota lukisan persembahan senibina
nota lukisan persembahan senibina
 
Prinsip rekaan premis makanan
Prinsip rekaan premis makananPrinsip rekaan premis makanan
Prinsip rekaan premis makanan
 
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 1 Introduction
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 1 IntroductionArchitectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 1 Introduction
Architectural Design 1 Lectures by Dr. Yasser Mahgoub - Lecture 1 Introduction
 
Architectural Professional Practice - Design
Architectural Professional Practice - DesignArchitectural Professional Practice - Design
Architectural Professional Practice - Design
 
Lukisan senibina
Lukisan senibinaLukisan senibina
Lukisan senibina
 
Green building
Green buildingGreen building
Green building
 

Similar to Diagnosing issues in your ASP.NET applications in production with Visual Studio 2012

Analyze Your Code With Visual Studio 2015 Diagnostic Tools
Analyze Your Code With Visual Studio 2015 Diagnostic ToolsAnalyze Your Code With Visual Studio 2015 Diagnostic Tools
Analyze Your Code With Visual Studio 2015 Diagnostic ToolsKen Cenerelli
 
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...Arti Parab Academics
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud RoadGert Drapers
 
Introduction to DL-BUILDER
Introduction to DL-BUILDERIntroduction to DL-BUILDER
Introduction to DL-BUILDERssuserc37b5e
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...WASdev Community
 
Reverse Engineering.pptx
Reverse Engineering.pptxReverse Engineering.pptx
Reverse Engineering.pptxSameer Sapra
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Application Streaming is dead. A smart way to choose an alternative
Application Streaming is dead. A smart way to choose an alternativeApplication Streaming is dead. A smart way to choose an alternative
Application Streaming is dead. A smart way to choose an alternativeDenis Gundarev
 
Preparing your dockerised application for production deployment
Preparing your dockerised application for production deploymentPreparing your dockerised application for production deployment
Preparing your dockerised application for production deploymentDave Ward
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Theo Jungeblut
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Qualcomm Developer Network
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkinsAbe Diaz
 
Thick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseNetSPI
 
Import Tools for InduSoft Web Studio - PanelMate, PanelView, and FactoryTalk
Import Tools for InduSoft Web Studio - PanelMate, PanelView, and FactoryTalkImport Tools for InduSoft Web Studio - PanelMate, PanelView, and FactoryTalk
Import Tools for InduSoft Web Studio - PanelMate, PanelView, and FactoryTalkAVEVA
 

Similar to Diagnosing issues in your ASP.NET applications in production with Visual Studio 2012 (20)

Analyze Your Code With Visual Studio 2015 Diagnostic Tools
Analyze Your Code With Visual Studio 2015 Diagnostic ToolsAnalyze Your Code With Visual Studio 2015 Diagnostic Tools
Analyze Your Code With Visual Studio 2015 Diagnostic Tools
 
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
 
Introduction to DL-BUILDER
Introduction to DL-BUILDERIntroduction to DL-BUILDER
Introduction to DL-BUILDER
 
Build Time Hacking
Build Time HackingBuild Time Hacking
Build Time Hacking
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
 
Reverse Engineering.pptx
Reverse Engineering.pptxReverse Engineering.pptx
Reverse Engineering.pptx
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Application Streaming is dead. A smart way to choose an alternative
Application Streaming is dead. A smart way to choose an alternativeApplication Streaming is dead. A smart way to choose an alternative
Application Streaming is dead. A smart way to choose an alternative
 
Preparing your dockerised application for production deployment
Preparing your dockerised application for production deploymentPreparing your dockerised application for production deployment
Preparing your dockerised application for production deployment
 
E.s unit 6
E.s unit 6E.s unit 6
E.s unit 6
 
DevOps intro
DevOps introDevOps intro
DevOps intro
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 4
 
Visual Studio Profiler
Visual Studio ProfilerVisual Studio Profiler
Visual Studio Profiler
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Ow
OwOw
Ow
 
Thick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash CourseThick Application Penetration Testing - A Crash Course
Thick Application Penetration Testing - A Crash Course
 
Import Tools for InduSoft Web Studio - PanelMate, PanelView, and FactoryTalk
Import Tools for InduSoft Web Studio - PanelMate, PanelView, and FactoryTalkImport Tools for InduSoft Web Studio - PanelMate, PanelView, and FactoryTalk
Import Tools for InduSoft Web Studio - PanelMate, PanelView, and FactoryTalk
 

More from Microsoft Developer Network (MSDN) - Belgium and Luxembourg

More from Microsoft Developer Network (MSDN) - Belgium and Luxembourg (20)

Code in the Cloud - Ghent - 20 February 2015
Code in the Cloud - Ghent - 20 February 2015Code in the Cloud - Ghent - 20 February 2015
Code in the Cloud - Ghent - 20 February 2015
 
Executive Summit for ISV & Application builders - January 2015
Executive Summit for ISV & Application builders - January 2015Executive Summit for ISV & Application builders - January 2015
Executive Summit for ISV & Application builders - January 2015
 
Executive Summit for ISV & Application builders - Internet of Things
Executive Summit for ISV & Application builders - Internet of ThingsExecutive Summit for ISV & Application builders - Internet of Things
Executive Summit for ISV & Application builders - Internet of Things
 
Executive Summit for ISV & Application builders - January 2015
Executive Summit for ISV & Application builders - January 2015Executive Summit for ISV & Application builders - January 2015
Executive Summit for ISV & Application builders - January 2015
 
Code in the Cloud - December 8th 2014
Code in the Cloud - December 8th 2014Code in the Cloud - December 8th 2014
Code in the Cloud - December 8th 2014
 
Adam azure presentation
Adam   azure presentationAdam   azure presentation
Adam azure presentation
 
release management
release managementrelease management
release management
 
cloud value for application development
cloud value for application developmentcloud value for application development
cloud value for application development
 
Modern lifecycle management practices
Modern lifecycle management practicesModern lifecycle management practices
Modern lifecycle management practices
 
Belgian visual studio launch 2013
Belgian visual studio launch 2013Belgian visual studio launch 2013
Belgian visual studio launch 2013
 
Windows Azure Virtually Speaking
Windows Azure Virtually SpeakingWindows Azure Virtually Speaking
Windows Azure Virtually Speaking
 
Inside the Microsoft TechDays Belgium Apps
Inside the Microsoft TechDays Belgium AppsInside the Microsoft TechDays Belgium Apps
Inside the Microsoft TechDays Belgium Apps
 
TechDays 2013 Developer Keynote
TechDays 2013 Developer KeynoteTechDays 2013 Developer Keynote
TechDays 2013 Developer Keynote
 
Windows Phone 8 Security Deep Dive
Windows Phone 8 Security Deep DiveWindows Phone 8 Security Deep Dive
Windows Phone 8 Security Deep Dive
 
Deep Dive into Entity Framework 6.0
Deep Dive into Entity Framework 6.0Deep Dive into Entity Framework 6.0
Deep Dive into Entity Framework 6.0
 
Applied MVVM in Windows 8 apps: not your typical MVVM session!
Applied MVVM in Windows 8 apps: not your typical MVVM session!Applied MVVM in Windows 8 apps: not your typical MVVM session!
Applied MVVM in Windows 8 apps: not your typical MVVM session!
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
 
Deep Dive and Best Practices for Windows Azure Storage Services
Deep Dive and Best Practices for Windows Azure Storage ServicesDeep Dive and Best Practices for Windows Azure Storage Services
Deep Dive and Best Practices for Windows Azure Storage Services
 
Building data centric applications for web, desktop and mobile with Entity Fr...
Building data centric applications for web, desktop and mobile with Entity Fr...Building data centric applications for web, desktop and mobile with Entity Fr...
Building data centric applications for web, desktop and mobile with Entity Fr...
 
Bart De Smet Unplugged
Bart De Smet UnpluggedBart De Smet Unplugged
Bart De Smet Unplugged
 

Diagnosing issues in your ASP.NET applications in production with Visual Studio 2012

  • 1. Diagnosing issues in your ASP.NET applications in production with Visual Studio 2012 Brad Sullivan brads@microsoft.com
  • 2. Agenda • Challenges in Production • Visual Studio Tools • Remote Debugger • IntelliTrace • Dump Debugger • Profiler • Sources and Symbols
  • 3. 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
  • 4. Remote Debugger: The Big Hammer • Advantages • Often the fastest way to resolve an issue • Xcopy deployable (%ProgramFiles%Microsoft Visual Studio 11.0Common7IDERemote Debugger) • Configurable Authentication • Disadvantages • Your service becomes unresponsive if you are stopped in the debugger • Requires some firewall configuration
  • 6. 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
  • 7. IntelliTrace • A “Back-in-Time” debugger • Configurable logging to trace the state of an application over time • Integrated with the Visual Studio Debugger UI for analysis • Can be run either locally or via command line
  • 8. IntelliTrace in Production • Download the IntelliTrace Collector http://www.microsoft.com/en-us/download/details.aspx?id=30665 • 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
  • 9. IntelliTrace Collection Plans • 2 Default Levels • Calls • Events • Custom? • Requires Editing XML • Can turn individual events on/off • Can include/exclude modules • Change max log file size
  • 10. 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
  • 11. System Center • IntelliTrace is integrated with System Center 2012 SP1 – Operations Manager • Application Performance Monitoring now available in an IntelliTrace format • IntelliTrace Profiling Management Pack allows you to collect IntelliTrace logs directly from the Operations Manager console
  • 12. 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 callstacks across all threads • Can be opened directly in VS and debugged just like a regular application • Except no stepping…
  • 13. Creating Dump Files in Production • Several tools available that can create dump files, 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: http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx
  • 14. Performance Profiler Overview • CPU Sampling • Shows what parts applications are executing the most frequently • Instrumentation • Records how long functions take to execute and how many times they are executed • .NET Memory Allocation • Tracks what objects are being allocated • Resource Contention • Tracks when threads are contending for the same resource causing slowdowns • Tier Interaction Profiling • Records database queries that go through ADO.NET
  • 15. Profiling Use • Can be run locally from the IDE • Can be run in production on the command line • Standalone installer included in the Visual Studio Install • “VS_INSTALL_DIRECTORYTeam ToolsPerformance ToolsSetups” • Tier Interaction Profiling • Find performance bottlenecks caused by how your application uses your database • Is used simultaneously with another profiling method (e.g. instrumentation)
  • 16. Symbols (PDBs) • The debugger, profiler, 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
  • 17. Source Indexing • Embeds a command into the symbol file for each source file indexed • Diagnostic tools execute this command to fetch the source file Exact Match
  • 18. Improved User Experience Better configuration when retrieving indexed sources • Trust a whole symbol file • Trust all symbol files
  • 19. Using TFS Build • Use TFS build definitions to save symbols and index sources • Builds that are released to production should be saved indefinitely
  • 20. More Info About Diagnostics ALM Team Blog: http://blogs.msdn.com/b/visualstudioalm/
  • 21. Request Features Uservoice site: http://visualstudio.uservoice.com/