TechEd North America 2014

Below are a few of the sessions from TechEd North America 2014 that I have watched along with a few personal notes. For a complete list of the sessions available head over to Channel 9.

A Practical View of Release Management for Visual Studio 2013

  • Ability to use Powershell DSC within Release Management
  • Integrates tightly into TFS although can be used without if desired.

Implementing a Release Pipeline with Release Management for Visual Studio 2013

  • Custom tooling can be created and added. I.e exe's, Powershell scripts, etc.
  • Pipelines can be automatic or manual.

Debugging Tips and Tricks in Visual Studio 2013

  • You can use actually start debugging by using F10 (Step Over) or F11 (Step Into) which will start debugging and will break on the first line of your code. Saves unnecessary break points.
  • Going to a particular line and pressing CTRL + F10 (Run To Cursor) will make the debugger goto the certain line. Saves unnecessary break points. If it's not part of the startup path, it will break once that point has been reached.
  • When viewing a DataTip, pressing CTRL will make the DataTip windows transparent. This is also true for the IntelliSense window too.
  • Enable or Disable Just My Code - Tools > Options > Debugging > General > Just My Code
  • Using the [DebuggerNonUserCode()] attribute will hide code from the Call Stack. The only time it will be displayed in the Call Stack window is when 'Show External Code' is enabled.
  • You can re-execute a certain block of code without having to restart debugging by using CTRL + Shift + F10 (Set Next Statement) while on the desired line. Note this might causes issues in some scenarios as the code will be run twice.
  • When debugging, you can right click code and choose 'Step into Specific' which will give you a selectable list of the multiple function calls. Saves going to definition then using a breakpoint.
  • In Visual Studio 2013 the 'Autos' will show the return values of all the calls. Handy for single lines with multiple functions.
  • You can write and execute code from within the 'Immediate Window'. This allows code to be tested without having to test all the startup path code too.
  • Right clicking on a breakpoint reveals a 'When Hit' option which can be used to write a comment or value to the Output Window.
  • In Visual Studio 2012 and above, a new debugger window has been added called 'Parallel Watch'. This is handy when wanting to compare values across multiple recursion calls.
  • In Visual Studio 2013 you are now able to see the Call Stack of Async tasks.
  • ALT + F12 (Peak Definition) Allows you to peak at the definition without loosing your context. The definition is displayed is displayed in an editor below the selected usage.

Diagnosing Issues in Production Environments with Visual Studio 2013

  • .PDB files are Symbol files. These are required for debugging and the symbol files must match the same build as the binaries not just the same source code version.
  • Should archive productions Symbol files.
  • Remote debugging in production isn't great as you will be holding up the live systems though sometimes you are forced to do so.
  • Remote Debugger needs to run as administrator else it will run under your user credentials which cannot attach to the process. This program needs to run on the server.
  • Turning off Just My Code when working with web frameworks like MVC will cause the debugger to not break for user un-handled exceptions as this is a feature/concept of Just My Code. An exception will however be written to the Output Window. Within the Debug menu > Exceptions, you can then set an exception to be thrown rather than logged.
  • If you don't have the project open that your debugging, then right click on the blank solution > Properties > Debug Files. Add the paths to the source code. Although, Why not just open the project up?
  • If you are remote debugging and your concerned about something taking a while to load which hasn't thrown an exception or broken yet, you can use the pause/breakpoint button in Visual Studio to break on the current executing line.
  • Profiler
    • vsperf..exe - Shows expensive method calls
  • IntelliTrace - captures reliability and performance data. Can be used when connecting using a remote debugger ins't available or for when a long sample time is required. IntelliTrace is no longer available as a download for Visual Studio 2013 as it's been moved into the Microsoft Monitoring Agent.

Posted in Programming with : Notes, PowerShell