6
votes

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
Any PhoneGapBuild peeps out there? PhoneGap Build site is now stuck loading on the Apps page, lots of folks including me are dead in the water. No replies on the Support forumuser206481

4 Answers

3
votes

Right click project > Properties > Build > check Define DEBUG constant

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

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

Edit:

For Visual Studio 2013, it seems like the following would work.

  1. With a project selected in Solution Explorer, on the Project menu, click Properties.
  2. Click the Compile tab.
  3. Click the Advanced Compile Options button to open the Advanced Compiler Settings dialog box.
  4. Select the Define DEBUG constant check box, and then click OK.
2
votes

In Visual Studio 2013

to see JavaScript console output, click:

DEBUGWindowsJavaScript Console

or use a shortcut to open the console:

CTRL + ALT + V, C

0
votes

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

You will see your console.log traces in the visual studio output window.

0
votes

In Visual Studio 2017

click on Debug > Windows > JavaScript Console.

Shortcut Ctrl + Alt + V, C