1

I have a very small Ionic app I've been working on (just a couple angular routes/views). When I run it using "ionic serve", the app loads in my browser as expected. However, when I upload it using "ionic upload" and view it in the Ionic View app, it appears as though none of my javascript works, or my routes are not working.

How can I debug this issue? Are there build tools to detect errors or anything along those lines?

2
  • I am unsure about Ionic View App, but I use Android SDK tools to compile and install my application. Then I use ADB to view the debug log using: adb logcat CordovaLog:D *:S. Alternatively, you can use Chrome's remote debugging WebView facility if you have a device having Anrdoid 4.4+(Kitkat or higher) - developer.chrome.com/devtools/docs/remote-debugging Commented Apr 15, 2015 at 7:28
  • Great, thank you! I will try that out to see if it shows me any errors. Commented Apr 15, 2015 at 16:47

2 Answers 2

5

As @Keval says if you're running Android you can debug on-the-fly using Chrome

  1. enable Developer options on your device (Settings > About, then find Build number and keep tapping it...yes really!)
  2. In Developer options, enable USB debugging checkbox
  3. plug in with a USB cable
  4. run your app on the device.
  5. At some point your device will then show a popup requiring you to accept debug commands from the remote computer, click Accept. If it doesn't appear the first time, unplug and replug usually fixes it
  6. head to chrome://inspect in desktop Chrome, and click inspect under your device
  7. A new Chrome window will open with all the juicy abilities you need - inspect code, set breakpoints, look at network speeds, access the console and so on

You can also do this on iOS via Safari http://developer.telerik.com/featured/a-concise-guide-to-remote-debugging-on-ios-android-and-windows-phone/

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

Comments

0

I had the same issue recently. The problem was that I stored my Ionic views NOT in /templates folder.

Please, check, maybe my answer will be useful for you.

1 Comment

He not means html views , he means the ionic view app in google play, search ionic view in google play.

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.