Windows Phone 8 IE10 Javascript 调试 [英] Windows Phone 8 IE10 Javascript debugging

查看:28
本文介绍了Windows Phone 8 IE10 Javascript 调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IE10 在 HTML5 合规性方面有一些出色的增强,但在 WP8 上运行时仍然无法开发 JavaScript HTML5,因为除了控制台消息之外,无法调试应用程序.

IE10 has some wonderful enhancements in the HTML5 compliance area but remains a bear to develop JavaScript HTML5 when running on the WP8 as there is no way to debug the app except console messages.

是否有像 WebKit 手机浏览器那样在 WP8 上运行的 IE10 的远程调试体验(请参阅 http://www.youtube.com/watch?v=GNAjzFpNEj4 例如).当使用 USB 电缆连接桌面 Safari 时,在 IOS 上调试 Javascript 应用程序很容易,因为可以在远程调试器中设置断点和检查变量.我希望 IE10 中具有相同的功能,并希望了解有关在何处启用这些非常需要的功能的信息.

Is there a remote debugging experience available for IE10 running on WP8 like the WebKit phone browsers have(see my video at http://www.youtube.com/watch?v=GNAjzFpNEj4 for example). When this is in place with a USB cable to desktop Safari debugging Javascript apps on IOS is easy as breakpoints can be set and variables examined in the remote debugger . I am hoping the same capabilities are in IE10 and would appreciate any information on where to enable these very much needed capabilities.

推荐答案

坏消息,与 WP7/IE9 相比,没有新的调试功能.请查看 如何调试 Internet ExplorerWindows Phone 7?因为我们在 WP8 上的情况完全相同.

The bad news, that there is no new debug capabilities in comparison to WP7/IE9. Please take a look on How do I debug Internet Explorer on Windows Phone 7? since we are in exactly the same situation on WP8.

我个人每天使用的东西

  1. 尽可能在 IE10 桌面版中调试您的应用

  1. Debug your app in IE10 Desktop as much as possible

Weinre 远程调试器.演示视频.您可以使用以下基于Weinre的应用程序来简化其使用(无需本地设置)- IeMobileDebugger src商店链接

Weinre remote debugger. Demo video. You can use the following app based on Weinre to simplify its usage (no local setup needed) - IeMobileDebugger src or link to Store

支持

HTML 遍历Html 节点样式、属性、指标读取控制台输出从控制台在设备端执行 js(包括智能感知)动态脚本注入 - 调试实时站点的能力

Html traversing Html node styles, properties, metrics Reading console output Executing js on device side from console (including intellisense) Dynamic script injection - ability to debug live sites

不支持

js 断点

对于 javascript 逐行调试,请使用 aardwolf.VS 集成演示.

For javascript line by line debugging use aardwolf. Demo with VS integration.

将控制台跟踪重定向到 Visual Studio 输出并能够使用 console.log("some message") 进行跟踪

To redirect console trace to Visual Studio output and be able to use console.log("some message") for tracing

index.html:

index.html:

<script type="text/javascript">
    window.console = {
        log: function (str) { window.external.Notify(str); }
    };

    // output errors to console log
    window.onerror = function (e) {
        console.log("window.onerror ::" + JSON.stringify(e));
    };

    console.log("Installed console !");
</script>

MainPage.xaml.cs

MainPage.xaml.cs

private void Browser_Loaded(object sender, RoutedEventArgs e)
{
    Browser.IsScriptEnabled = true;
    // Add your URL here
    Browser.Navigate(new Uri(MainUri, UriKind.Relative));

    Browser.ScriptNotify += (s, arg) =>
    {
        Debug.WriteLine(arg.Value);
    };           
}

这篇关于Windows Phone 8 IE10 Javascript 调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆