I’m currently trying to get the regular Angular $log-output to show up somewhere when testing on the iOS simulator.
I know I can use the Safari debugging tools, but this won’t log anything before I actually attach the debugger in Safari, i.e. every piece of code that runs before I can attach it can’t be debugged.
Well, the XCode console will also show you your console.log output, but it won’t show you ALL the other errors in your javascript or with objects & plugins.
I find the WebInspector to be the best for finding obscure scripting errors that can cause problems in my app. One thing I do is:
Run up the app on the simulator or on your actual device.
Start up the WebInspector debugger window in Safari
Execute the following command in the WebInspector console:
window.location.reload()
This will force your app to restart in the simulator or device, then you can get a full debugging trail - even those calls made before your app views are rendered. So effectively, you can debug your app from initial startup, that you can’t normally do with WebInspector.
My personal experience is that it’s always the easiest way to debug it with chrome. Start a local webserver and run our application with chrome. The debugger is the best one I know. For all other things (e.g. if you debug push notification things) use xcode.
I’m quite new to the whole mac/xcode thing. I have inserted several debuggers at my js in xcode, but when I emulate the app in the emulator, the xcode debugger does not stop. Do you know how to debug the ionic js in xcode?
HI I have build on c9 an app that gets data via rest api from wordpress. That app works in the browser but when I upload that app to the ionic view no data is loaded same when I run $ ionic emulate ios but when I use $ ionic emulate ios -lc as mharington suggested my app works in ios emulator. What is going on ?
Will my app work on real device as an independent app is there any way to test on real device as an independent app before i release that to itunes.