What’s New for the Debugger in Visual Studio 2013
Contents
Asynchronous Debugging in Windows Store Apps
Just My Code for C++ and JavaScript Debugging
64-bit Edit and Continue for the .NET Framework
Return value inspection for .NET Framework Methods
.NET Framework Memory Analysis with Dump Files
Debug with Debugging Tools for Windows
Code Map Debugging
IntelliTrace Debugging
Asynchronous Debugging in Windows Store Apps
The debugger has enhanced support for the Windows Runtime asynchronous programming model. In .NET Framework languages, the model is expressed through the async/await keyword (Async/Await in Visual Basic). In C++ and C++/Cx, task objects and .then continuations support the model. And JavaScript uses promise objects and .then continuations.
The Call Stack window shows the methods that call asynchronous functions under [Async Call] information frames.
The Tasks window (formerly known as the Parallel Tasks window) displays the new model as tasks, along with enhanced information about the tasks. See Using the Tasks Window.
Enhanced exception reporting for C++ Windows Store Apps The Visual Studio debugger now supports capturing stack traces for C++ exceptions when they occur in Windows Runtime components. The debugger can display those captured stack traces whenever they are available on exception objects that are derived from Platform::Exception.
The exception dialog box displayed by the debugger at a first-chance exception lists the stack trace at the point when the exception occurred.
You can inspect future Windows Runtime exceptions in a debugging session by adding the $exceptionstackpsuedovariable to a Watch window. If an exception occurs in the current thread, you can expand the entry in the Watch window to see the stack track trace and navigate to source code that caused the exception. You also can watch $exceptionstack by choosing the Add exception stack trace to watch link in the exception dialog box.
For more information, see this post on the Visual Studio ALM + Team Foundation Server Blog.
Just My Code for C++ and JavaScript Debugging
Just My Code hides non-user code in the Call Stack window, such as the code in system, Win.JS and 3rd party libraries. Just My Code makes it much easier to find your methods when you are debugging asynchronous code or debugging in mixed mode with JavaScript and C++.
Just My Code is on by default in Visual Studio 2013. To view all code on the call stack, choose Options and Settings on the Debug menu, and then clear the Enable Just My Code checkbox. Note that this setting applies to all programming languages that support Just My Code.
64-bit Edit and Continue for the .NET Framework
The debugger now supports edit and continue for apps that target 64-bit platforms.
Return value inspection for .NET Framework Methods
You can now view the return values of methods in the Autos window. This is especially useful for embedded methods (methods that are passed as parameters to another function):
See Examine return values of method calls
.NET Framework Memory Analysis with Dump Files
One of the issues that frequently affects .NET applications running in production environments is problems with their memory use which can impact both the application and potentially the entire machine. Visual Studio 2013 expands its dump file analysis tools to help you find memory leaks, inefficient memory use, and unnecessary allocations in .NET Framework web, database, and desktop applications.
Note
Memory analysis of .NET Framework dump files is not supported for Windows Store apps. See Analyzing memory usage in Windows Store apps (JavaScript) for information about JavaScript apps.
For more information about the .NET memory analysis tool, see this post on the Visual Studio ALM + Team Foundation Server Blog. For more information about dump files, see Use Dump Files to Debug App Crashes and Hangs in Visual Studio.
Debug with Debugging Tools for Windows
Note
The SOS.dll (SOS Debugging Extension) that helps you debug managed programs in WinDbg, is not available from the Visual Studio IDE. See Debugging Managed Code Using the Windows Debugger
You can use the Debugging Tools for Windows in the Visual Studio IDE. You must install the debugging tools that are part of the Windows Driver Kit (WDK). See Windows 8.1 Preview: Download kits, bits, and tools.
Code Map Debugging
Visualize the call stack while debugging in Visual Studio Ultimate by creating code maps. You can also use code maps to navigate around your code. See Map methods on the call stack while debugging in Visual Studio.
IntelliTrace Debugging
Monitor your app for deployment problems.
Monitor IIS web apps locally for exception and performance events with Microsoft Monitoring Agent, either alone or with System Center 2012. You can record these events to an IntelliTrace log so that you can investigate these problems further in Visual Studio Ultimate and go to the deployed code when you start debugging from specific events.
Record diagnostic events from SharePoint 2010 and SharePoint 2013 applications in deployment with Microsoft Monitoring Agent.
You can save user profile events, Unified Logging System (ULS) events, and IntelliTrace events to an IntelliTrace log so that you can investigate these problems further in Visual Studio Ultimate and start debugging from specific events with IntelliTrace.
See Set up your release to diagnose problems after deployment and What's New for System Center 2012 R2 Operations Manager