Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

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 $exceptiontrace 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 $exceptiontrace 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 the call stack while debugging in Visual Studio.

Debugging with call stacks on code maps

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.