gpt4 book ai didi

javascript - 如何调试phonegap windows phone 8.1

转载 作者:行者123 更新时间:2023-11-29 10:43:10 25 4
gpt4 key购买 nike

我是 Windows Phone 开发的新手,发现我不知道如何使用 Windows Phone 模拟器调试 cordova/phonegap 应用程序。

我发现使用 weinre ( from here ) 可以调试应用程序,但仍未找到如何将其与模拟器连接(在 index.html 中使用 <script src="http://127.0.0.1:8080/client/#anonymus"></script> 无效)

所以,对于 2 个可能的问题,我有 2 个可能的答案:

1) 如何为 Windows Phone 调试我的 cordova/phonegap 应用程序?

2) 如果使用 weinre,我怎样才能让它工作以便调试我的应用程序?

最佳答案

确保您已经在 VS 中创建了 Windows Phone 项目。如果您可以在设备上运行它,那么它应该适用于以下内容。取自本网站:http://sviluppomobile.blogspot.cz/2013/03/how-to-debug-windows-phone-html5-apps.html

You can verify if the server started by opening a browser page and loading 127.0.01:8080 (8080 is the default port for Weinre). If you are seeing this page then the server is running:

Now click on the Debug Client User Interface link where you will be able to see if any client is connected and debug the connected clients. Let's create the Windows Phone HTML5 application. Use the SDK template to create a new project, open the page index.html inside the folder Html and add this line to the head section:

<script src="http://[the server
ip]:8080/target/target-script-min.js#anonymous"></script>

replace [the server ip] with the IP of the PC running the Winre server and run the application. If everything went as we expected in the Debug Client user Interface on the Server we should see one Target connected:

Once the target Windows Phone page is connected you can inspect and change the DOM in real-time

如果您始终无法在 IE11 中运行站点并更改其设置以模拟 Windows Phone 设备,然后使用内置的 IE 调试工具,但显然不能在设备上调试...

关于javascript - 如何调试phonegap windows phone 8.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24904503/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com