Reputation: 11247
I am encountering a problem when I try to debug my phonegap app using debug.phonegap.com.
I put this vode inside the head of the HTML document
<script src="http://debug.phonegap.com/target/target-script-min.js#[guide goes here]"></script>
Prior to launching the app I run the debugger from build.phonegap.com, and then launch the app.
The Phonegap debugger doesn't recognize my Android device.
config.xml files:
<access origin="debug.phonegap.com" subdomains="true" />
<access origin="*" />
Any idea what should I do to make it work?
Upvotes: 3
Views: 4158
Reputation: 3610
You don't need to add that code to your app if you're using http://build.phonegap.com. When you build your app there with the Enable debugging option checked in Settings, that line is automatically added. So when you open it it sends the ID to weinre and the debug session starts.
The method described by Dom is how it is supposed to work.
Alternatively, you can do what http://build.phonegap.com does for you but manually, and see if that makes any difference. I've tried this for an Android PhoneGap app and it works:
<script src="http://debug.build.phonegap.com/target/target-script-min.js#[id]"></script>
replacing [id]
with a random string of your choice.$ phonegap local build android
) and install the .apk manually or with ADT or however you want.[id]
as before.Make sure your app is set as debuggable. It's the default for Android PhoneGap apps.
Upvotes: 2
Reputation: 2569
I am not sure what <script src="http://debug.phonegap.com/target/target-script-min.js#[guide goes here]"></script>
is supposed to do. I don't use that in my debug builds. Additionally, having <access origin="*" />
covers everything so your first access rule is irrelevant.
Once you build your app on build.phonegap.com, download and install it on your device. Then, back on build.phonegap.com, click the debug button and it will open weinre with your correct app id. Then, open the app on your device and you will be connected.
Upvotes: 1