Microsoft brings iOS JavaScript debugging to MacOS, Windows

Microsoft brings iOS JavaScript debugging to MacOS, Windows

Looking to woo Apple iOS developers, Microsoft is enhancing its Visual Studio Code editor this week with the capability to debug JavaScript code for iOS mobile devices.

The iOS Web Debugger for Visual Studio Code is an extension supported on both Mac and Windows PCs that enables developers to debug JavaScript code running in the Safari browser on iOS devices.

Until now, the ability to debug websites running on iOS devices has only been available to a subset of developers, said Kenneth Auchenberg, program manager for dev tools and remote debugging at Microsoft. "For example, using the Safari Web Inspector (Safari DevTools) requires an instance of desktop Safari that only is available for MacOS users," he said. "Today, we're enabling mobile web developers to debug JavaScript running on their iOS devices directly from their editor."

The extension operates in two modes: launching a URL on a Safari device or attaching to a running tab inside Safari. Two open source projects, ios-webkit-debug-proxy, and ios-webkit-debug-proxy-win32 are used for connecting from Microsoft's debugging library to the iOS device. These projects enable communication with iOS devices over USB via the WebKit Remote Debugging Protocol. "The protocol is compatible with the Chrome Debugging Protocol for the script debugging APIs, and this means our debugger works without additional mapping logic," Auchenberg said.

Features supported in the extension include setting of breaking points, stack traces, debugging of eval scripts, and virtual forwarding via HTTP tunnel from the local PC. Auchenberg explained that it's cumbersome to enable mobile devices to access a local development server. "To make this easier, platforms like Android support point-forwarding natively, but iOS doesn't support this." Instead, Microsoft emulates port-forwarding by adding an option to start an instance of localtunnel, which creates an HTTP tunnel from a local computer to the public internet for a specified tunnelPortproperty. The HTTP tunnel is used by the iOS device to access the local development server.

Microsoft has been courting iOS developers of late. The planned Visual Studio 15 platform has been fitted with a capability to import Xcode projects that leverage C++. The company also acquired cross-platform mobile development tools vendor Xamarin, which supports iOS.

IDG Insider

PREVIOUS ARTICLE

«Proposed ‘social media ID, please' law draws outrage

NEXT ARTICLE

New York Public Library reads up on the cloud»

Add Your Comment

Most Recent Comments

Our Case Studies

IDG Connect delivers full creative solutions to meet all your demand generatlon needs. These cover the full scope of options, from customized content and lead delivery through to fully integrated campaigns.

images

Our Marketing Research

Our in-house analyst and editorial team create a range of insights for the global marketing community. These look at IT buying preferences, the latest soclal media trends and other zeitgeist topics.

images

Poll

Should we donate our health data the same way we donate organs?