In this post, I show how to debug a meteor app on all platforms: server, web client, android, ios
1. Web clients
I use the Developer Tools in chrome to debug the client code, the developer tools in firefox are also ok. Debugging coffeescript is supported out of the box.
2. Server code
To debug the server code, start the server with the parameter debug instead of simply starting the server with the command ‘meteor’:
The URL of the debugger is then displayed in the console:
Open the URL in chrome to get the debugger. The server side debugger looks like the developer tools in chrome.
To debug from a remote machine, replace localhost with the host ip.
- On the iOS device: select Settings > Safari > Advanced > enable Web inspector
- In Safari on the desktop: select Preferences > Advanced > show developer menu in menubar
- Run app from xcode on the iOS device or simulator
- In Safari, after a few seconds you will see in the ‘Develop’ menu the name of device and the name of the app, choose meteor.local under the app name.
Debugging meteor app in android is done with chrome on the desktop with the device connected with the usb cable. Here are the steps:
- On the android device:
- Enable the developer options: select Settings > About phone and tap Build number seven times.
- select Settings > Developer options.
- or install the ‘USB debugging’ app, it shows the Developer options when the device is plugged on the USB cable.
- Enable USB debugging
- Run the app in the device
- In chrome on the desktop: go to chrome://inspect, when the device name and the app name is displayed, click on inspect to open the debugger.
For more information, read the remote debugging in chrome documentation