6

I am developing a mobile app using Phonegap Build to generate for different mobile platforms. I have successfully deployed and debugged my APK file on Android devices using adb tools and ddms. Now on to Windows Phone 8, but I am having trouble figuring out how to debug.

I have a Windows 8 Pro machine and have successfully installed Windows Phone SDK, deployed the XAP file to both the emulator and a Windows Phone 8 device using the Application Deployment tool (got the MS Dev subscription, registered the phone, all that stuff). The app loads but appears to not receive the deviceready event, but I really have no idea because I can't see the console log.

The SDK came with Visual Studio Express, but I don't see how to open an XAP to run it from VS so the output might go to the VS debug windows. Is there any way to see the console.log statements from my XAP from Phonegap Build? or must I create a VS project and compile/run from there?

4

4 回答 4

3

右键单击项目>属性>构建>检查定义调试常量

如果选项被禁用,停止代码执行(Shift+ F5

消息应该转到输出窗口。要打开它,请转到查看 > 输出 ( Alt+ 2)

编辑:

对于 Visual Studio 2013,似乎以下内容可行。

  1. 解决方案资源管理器中选择项目后,在项目菜单上单击属性
  2. 单击编译选项卡。
  3. 单击高级编译选项按钮打开高级编译器设置对话框。
  4. 选中定义调试常量复选框,然后单击确定
于 2013-07-25T19:22:18.920 回答
2

在 Visual Studio 2013 中

要查看 JavaScript 控制台输出,请单击:

DEBUGWindowsJavaScript Console

或使用快捷方式打开控制台:

CTRL + ALT + V, C

于 2015-11-27T15:40:01.273 回答
0

如果您按照此处的说明使用 vs 创建 wp8/cordova 项目http://docs.phonegap.com/en/2.5.0/guide_getting-started_windows-phone-8_index.md.html#Getting%20Started%20with%20Windows%20Phone %208

您将在 Visual Studio 输出窗口中看到您的 console.log 跟踪。

于 2013-03-06T12:24:36.260 回答
0

在 Visual Studio 2017 中

单击“调试”>“Windows”>“JavaScript 控制台”。

快捷键 Ctrl + Alt + V, C

于 2018-08-22T11:01:21.060 回答