I'm new to windows phone development and found that I don't know how to debug a cordova/phonegap app with windows phone emulator.
I found out that using weinre
(from here) it's possible to debug app, but still haven't found how to connect it with emulator (Using <script src="http://127.0.0.1:8080/client/#anonymus"></script>
in index.html have not worked)
So, I have 2 possible answers to 2 possible questions:
1) How can I debug my cordova/phonegap app for windows phone?
2) If using weinre, how can I make it work so I can debug my app?
Ensure that you have created the Windows Phone project in VS. If you can run it on the device then it should work with the following. Taken from this site: 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
Failing that you can always run the site in IE11 and change its settings to emulate a Windows Phone device, then use the inbuilt IE debug tools, but that obviously doesn't debug on the device...