Debugging Apps and Analysing Usage
with Visual Studio 2013
Visual Studio 2013 Airlift
05-12-2013
jorge.borralho@xpand-it.c...
who am i

• Jorge Borralho
• 8+ years in application development
– mainly with Microsoft products – C#, asp.net, mvc, shar...
abstract

• Debug tools
x64 bits edit &
continue

Return value
inspection

Asynchronous
Debugging

Just my code
(javascrip...
x64 edit & continue

• Must target 4.5.1
• Using 3rd party hosts must use IIS Express

2003 - 2013

© Copyright Xpand IT

...
Return value inspection

• Inspect functions/nested functions return values relevant
to current debugging session

Demo

2...
Asynchronous debugging

• Simplified infraestructure code in call stack
• Visualize tasks

VS 2012

VS 2013

2003 - 2013

...
Just my code – JS & C++

• Step through 3rd party code right to your code;
• Ignore Exceptions managed by 3rd party code.
...
Code map

• Enhanced Call Stack

Demo

2003 - 2013

© Copyright Xpand IT

www.xpand-it.com
MMA & Intelitrace Debugging

• Diagnose problems in deployment with Visual Studio and
Microsoft Monitoring Agent

• Enabli...
MMA & Intelitrace Debugging

• Debugging from Intelitrace Log
– Matching source files and symbols (.pdb)
– Visual Studio 2...
MMA & Intelitrace Debugging

• Review Performance Violation (1/3)

Review recorded events and choose to “dig deeper”
2003 ...
MMA & Intelitrace Debugging

• Review Performance Violation (2/3)

See multiple calls to this event, review slowest ones a...
MMA & Intelitrace Debugging

• Review Performance Violation (3/3)

Review call stack, recorded values, step through and ac...
MMA & Intelitrace Debugging

• Exception Data

Get all exceptions recorded – and debug them
2003 - 2013

© Copyright Xpand...
MMA & Intelitrace Debugging

• Analysing Sharepoint unhandled exception (1/3)

Get the Correlation Id

2003 - 2013

© Copy...
MMA & Intelitrace Debugging

• Analysing Sharepoint unhandled exception (2/3)

Go to Analysis in the iTrace file and searc...
MMA & Intelitrace Debugging

• Analysing Sharepoint unhandled exception (3/3)

Get full info in the exception, step into t...
Dump file analysis

• When a long running app starts behaving sluggishly or
crashes with OutOfMemoryException, or even the...
Dump file analysis

• Analyse them directly in visual studio

Demo

2003 - 2013

© Copyright Xpand IT

www.xpand-it.com
Energy Consumption (1/3)

• The Visual Studio Energy Consumption profiler helps
you analyze the power and energy consumpti...
Energy Consumption (2/3)

• What’s measured?

• Mark profiling data

2003 - 2013

© Copyright Xpand IT

www.xpand-it.com
Energy Consumption (3/3)

• Configure device and collect data

• Profile data

2003 - 2013

© Copyright Xpand IT

www.xpan...
Q

&

A

jorge.borralho@xpand-it.com
2003 - 2013

© Copyright Xpand IT

www.xpand-it.com
Upcoming SlideShare
Loading in …5
×

Debugging Apps & Analysing Usage

825 views

Published on

Debugging Apps & Analysing Usage - Jorge Borralho, Project Manager, Xpand IT

Xpand IT presentation during the Visual Studio 2013 - Live Seminar

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
825
On SlideShare
0
From Embeds
0
Number of Embeds
110
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Debugging Apps & Analysing Usage

  1. 1. Debugging Apps and Analysing Usage with Visual Studio 2013 Visual Studio 2013 Airlift 05-12-2013 jorge.borralho@xpand-it.com www.xpand-it.com Proprietary & Confidential
  2. 2. who am i • Jorge Borralho • 8+ years in application development – mainly with Microsoft products – C#, asp.net, mvc, sharepoint, sql server 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  3. 3. abstract • Debug tools x64 bits edit & continue Return value inspection Asynchronous Debugging Just my code (javascript) Intelitrace debugging Dump file analysis Energy consumption Code map • Profiling tools Microsoft Monitoring Agent 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  4. 4. x64 edit & continue • Must target 4.5.1 • Using 3rd party hosts must use IIS Express 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  5. 5. Return value inspection • Inspect functions/nested functions return values relevant to current debugging session Demo 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  6. 6. Asynchronous debugging • Simplified infraestructure code in call stack • Visualize tasks VS 2012 VS 2013 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  7. 7. Just my code – JS & C++ • Step through 3rd party code right to your code; • Ignore Exceptions managed by 3rd party code. Demo 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  8. 8. Code map • Enhanced Call Stack Demo 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  9. 9. MMA & Intelitrace Debugging • Diagnose problems in deployment with Visual Studio and Microsoft Monitoring Agent • Enabling MMA: – – – • Impacts app performance – – 2003 - 2013 <ModuleList isExclusionList="false"> <Name>PublicKeyToken:B77A5C561934E089</Name> Configure witch modules to monitor <Name>PublicKeyToken:B03F5F7F11D50A3A</Name> Start monitoring (defining trace level) PS C:>Start-WebApplicationMonitoring "IIS:Test.Web" Monitor <Name>PublicKeyToken:31BF3856AD364E35</Name> "C:IntelliTraceLogs” <Name>PublicKeyToken:89845DCD8080CC91</Name> Capture Intelitrace snapshot <Name>PublicKeyToken:71E9BCE111E9429C</Name> </ModuleList> Enabled to whole application pool Captures (almost) every object value in method-calls from defined modules © Copyright Xpand IT www.xpand-it.com
  10. 10. MMA & Intelitrace Debugging • Debugging from Intelitrace Log – Matching source files and symbols (.pdb) – Visual Studio 2013 ultimate – .iTrace file 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  11. 11. MMA & Intelitrace Debugging • Review Performance Violation (1/3) Review recorded events and choose to “dig deeper” 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  12. 12. MMA & Intelitrace Debugging • Review Performance Violation (2/3) See multiple calls to this event, review slowest ones and debug them 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  13. 13. MMA & Intelitrace Debugging • Review Performance Violation (3/3) Review call stack, recorded values, step through and access Intelitrace 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  14. 14. MMA & Intelitrace Debugging • Exception Data Get all exceptions recorded – and debug them 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  15. 15. MMA & Intelitrace Debugging • Analysing Sharepoint unhandled exception (1/3) Get the Correlation Id 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  16. 16. MMA & Intelitrace Debugging • Analysing Sharepoint unhandled exception (2/3) Go to Analysis in the iTrace file and search by correlation Id 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  17. 17. MMA & Intelitrace Debugging • Analysing Sharepoint unhandled exception (3/3) Get full info in the exception, step into the intelitrace in that moment 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  18. 18. Dump file analysis • When a long running app starts behaving sluggishly or crashes with OutOfMemoryException, or even the whole server/system slows down – Probably bad memory usage: • Memory leaks • Unnecessary allocation • Inefficient memory use • Better analyze the memory dump – using task manager, procdump (sysinternals) or even VS 2013 (capturing a breakpoint) 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  19. 19. Dump file analysis • Analyse them directly in visual studio Demo 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  20. 20. Energy Consumption (1/3) • The Visual Studio Energy Consumption profiler helps you analyze the power and energy consumption of Windows Store apps on low-power tablet devices that run all or part of the time on their own batteries. On a battery-powered device, an app that uses too much energy can cause so much customer dissatisfaction that, eventually, customers might even uninstall it. Optimizing energy use can increase your app’s adoption and use by customers. 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  21. 21. Energy Consumption (2/3) • What’s measured? • Mark profiling data 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  22. 22. Energy Consumption (3/3) • Configure device and collect data • Profile data 2003 - 2013 © Copyright Xpand IT www.xpand-it.com
  23. 23. Q & A jorge.borralho@xpand-it.com 2003 - 2013 © Copyright Xpand IT www.xpand-it.com

×