Friday, April 20, 2012

Windows 8 Quick Tip: Debugging Managed Code Referenced by HTML 5 Applications

You can write libraries in Managed C# or VB, or native C++ that can be used from Windows 8 HTML5 applications as long as they are exported as WinMD libraries and conforms to WinMD rules. This is very useful especially if you want to use features in the managed world like Linq or consume SOAP services with the strongly typed WSDL proxy generator.

While I was trying to debug the managed code referenced by the HTML applications, no breakpoints were hit. After some poking around I discovered a setting that can enable debugging managed code in HTML applications.

In the HTML project properties navigate to the “Debugging” section and select “Managed Only” or “Mixed”. Please note that this will disable JavaScript debugging, so you have to choose between debugging managed libraries or Scripts at a time. The following screenshot shows this setting.

managed_debugging

1 comment:

Mohamed Hosny said...
This comment has been removed by the author.