简体   繁体   中英

How to debug cordova/phonegap app in windows phone emulator

I'm developing a windows phone app usign Cordova / Phonegap. I made it work for Android, but now that I'm trying wp for the first time I find myself with some unknown errors (some elements are not getting loaded).

How can I debug my javascript so I can get to know what is going wrong with my app?

It's very easy to debug a Windows Cordova/Phonegap app from Visual Studio. When you create your project and then add the Windows platform:

cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add windows

Cordova will create a CordovaApp.sln file in the hello\\platforms\\windows directory. Open that up in Visual Studio 2013 (or open CordovaApp.vs2012.sln if you have Visual Studio 2012), select the project you want to debug in the Solution Explorer pane, select the emulator you want to run it in in the toolbar (or select Device to run it on an actual device), and then hit F5 to start debugging. You can set breakpoints in your Javascript code just like you would in C# or VB. Visual Studio运行菜单

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM