How to see javascript console exit from Windows Phone 8 emulator or device using Phonegap application

I am developing a mobile application using Phonegap Build to create for different mobile platforms. I have successfully deployed and debugged my APK file on Android devices using adb and ddms tools. Now on Windows Phone 8, but it's hard for me to figure out how to debug.

I have a Windows 8 Pro machine and successfully installed the Windows Phone SDK, deployed the XAP file on both the emulator and the Windows Phone 8 device using the application deployment tool (received an MS Dev subscription, registered the phone, all this stuff). The application loads, but does not seem to receive the deviceready event, but I really don't know, because I don't see the console log.

The SDK comes with Visual Studio Express, but I don’t see how to open XAP to start it from VS, so that the output can go to the VS debug windows. Is there a way to see console.log instructions from my XAP from Phonegap Build? or should I create a VS project and compile / run there?

+6
source share
3 answers

Right-click the project> Properties> New> check Define DEBUG constant

If the option is disabled, stop executing the code ( Shift + F5 )

Messages should go to the output window. To open it, go to View> Output ( Alt + 2 )

Edit:

For Visual Studio 2013, the following seems to work.

  • When you select a project in Solution Explorer , on the Project menu, click Properties .
  • Click the Compile tab.
  • Click the Advanced Compilation Options button to open the Advanced Compiler Options dialog box.
  • Select the Define DEBUG constant check box and click OK .
+3
source

In Visual Studio 2013

To see the output of the JavaScript console, click:

DEBUG β†’ Windows β†’ JavaScript Console

or use the shortcut to open the console:

CTRL + ALT + V, C

+2
source

If you create a wp8 / cordova project with vs, as described here http://docs.phonegap.com/en/2.5.0/guide_getting-started_windows-phone-8_index.md.html#Getting%20Started%20with%20Windows%20Phone % 208

In the visual studio output window, you will see your console.log tracks.

0
source

All Articles