Mixed Native and Managed Debugging Improvements for Windows Store Apps

Brad Sullivan

In Visual Studio 2012 RTM, there was limited support for mixed managed and native debugging of Windows Store apps.  This support was greatly enhanced in Update 1.

Setup

Enabling mixed mode debugging is simple.  All you need to do is select your project and choose “Properties” from the context menu.  Then click on the Debug properties tab.  Then on the debugger type, select “Mixed (Managed and Native)”. Then hit F5 as usual.

Here is what this looks like when configuring a managed project.

 

 

And here is what the project configuration looks like on a native application.

 

Inspection of Native WinRT objects

When stopped at a breakpoint, it was very difficult or impossible to view the object in the locals window, watch window, etc.  As you can see, there is not a lot of interesting information when you are looking at Button1 using the RTM release of VS2012.

 

 With the Update 1 release, the object inspection experience is exactly the same as it is when debugging only native code and you can now see the properties that you expect when you expand button1.

 

 Additionally, the new Debugger Type Visualizers for Visual Studio 2012 now also apply when mixed debugging a Windows Store app.

Remote Debugging

It is now possible to remote debug a Windows Store application using the mixed mode debugger when the target is an x86 or x64 machine.  This is accomplished by just using the standard procedures for running Windows Store apps on a remote machine.

This is not currently supported on ARM machines.

 

Reliability in Execution Control

One noticeable area of improvement was in stepping between WinRT components.  Let’s say that you were stopped here:

 

 

…and you wanted to step into your native component.  While before with the RTM release you would end up here:

 

…now with these improvements in Update 1, you will land where you would expect:

 

We would love to hear any questions or comments you have on the mixed debugging experience for Windows Store applications in the comments below or in our MSDN forum.

0 comments

Discussion is closed.

Feedback usabilla icon