Tomas Hromnik
Tomas Hromnik

Reputation: 2200

How to debug MeteorJS Cordova application?

We can build Cordova application from Meteor version 0.9.2.

How can we debug it? Client & server code?

Upvotes: 1

Views: 1749

Answers (3)

sMyles
sMyles

Reputation: 2696

The Meteor site has all of the information on this: https://guide.meteor.com/mobile.html

Debugging Android in Chrome: https://developers.google.com/web/tools/chrome-devtools/remote-debugging/#remote-debugging-on-android-with-chrome-devtools enter image description here

The one thing however that was not mentioned is how to view the "client side native logs" -- to do this for Android, just run this command in terminal after running meteor run android-device:

adb logcat

See the Meteor docs for iOS debugging

Upvotes: 0

imslavko
imslavko

Reputation: 6676

You can debug the server-part in the same way as you would do it with a regular node app: https://www.youtube.com/watch?v=VrmdbEvoAPg

For the Cordova app, there are no good ways for step-though debugging yet, but console.logs appear in the terminal of running app. Ideally, I would develop my app against the browser and then test it on mobile emulator in the end.

Refer to the docs: https://github.com/phonegap/phonegap/wiki/Debugging-in-PhoneGap

Upvotes: 0

Iggy van Lith
Iggy van Lith

Reputation: 666

Came here because I was looking for a similar solution. I found out there actually is a way.

It depends on your device but if you have Chrome installed on an Android and on your computer the steps are the same as you would debug a mobile website on your device.

  1. Plug your device to your computer.
  2. In Chrome go to chrome://inspect
  3. Open your app on your device
  4. On the bottom on the chrome page it should say something like "WebView in ..."
  5. Click the inspect-link.
  6. HAPPY DEBUGGING :)

For iOS there is a similar way with Safari. http://blog.differential.com/debug-a-meteor-cordova-app/

For an extended guide on how to debug on your mobile phone: https://developer.chrome.com/devtools/docs/remote-debugging

For the server-code you can use the terminal like you normally would.

Upvotes: 5

Related Questions