1

I can't seem to find an answer to this seemingly simple question. I have an app that i've built using the command line phonegap tools and when i start this app it opens up. i am using something called ios_sim (https://github.com/phonegap/ios-sim) which launches the app in the simulator and does not launch xCode (i don't quite understand why this is a feature, it seems like xCode has some useful tools)

Anyhow, my app is not functioning the same way that it does in the browser and i need to debug it. I have also already installed Charles to inspect the requests and i can verify that the correct data is coming from my API so my assumption is that there is some sort of javascript error in rendering the page (the page is partially rendered btw).

All i want to do is view the javascript errors. the same way that you would in the console if you were looking at a web page.

how do you do that?

1
  • 1
    Enable 'Develop' option from Safari. Then select from the 'Develop' menu 'Simulator', you will see app listed there, select it and in the new window will be able to access Debugger/Console Commented Mar 4, 2016 at 19:19

1 Answer 1

3

You have to use Safari Remote Debugging with Web Inspector. See in the relating cordova docs how to do that!

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I had looked at this before but my problem was that i was launching the app on my phone by launching the phonegap app and pointing it at the IP address shown on the PhoneGap Developer App. Because i did it this way (rather than launching from xcode or the phonegap cli into a simulator) i was unable to do the safari remote debugging. got it working with the simulator now, thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.