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

查看:131
本文介绍了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.

在WP8上运行的IE10是否有类似WebKit手机浏览器的远程调试体验(请参阅我在 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 Explorer Windows 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的应用程序来简化其使用(无需本地设置) - < a href =https://github.com/sgrebnov/IeMobileDebugger =nofollow noreferrer> 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 breakpoints

js breakpoints

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

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

至将控制台跟踪重定向到Visual Studio输出并能够使用console.log(某些消息)进行跟踪

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天全站免登陆