Export (0) Print
Expand All

What’s New for the Debugger in Visual Studio 2013

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 $exceptionstack psuedovariable 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 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.

The debugger now supports edit and continue for apps that target 64-bit platforms.

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):

Embedded methods in the code editor Method return values in the Autos window

See Examine return values of method calls

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 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.

Note 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.

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.

Debugging with call stacks on code maps

  • 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.

    View performance event details

    Start debugging from method call

    Go to application code from performance event

  • 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.

    IntelliTrace log file - View web request + events

See Set up your release to find and debug deployment problems and What's New for System Center 2012 R2 Operations Manager

Show:
© 2014 Microsoft