I am running an Ionic app integrated with SalesForce Mobile SDK. I am running it in Android Studio, because Ionic Serve doesn't support the SDK and some of the other plugins, and I need to run it in an Emulator. In this case - Android emulator.
I am new to Android Studio, can somebody guide me on how to put logs into the JavaScript/TypeScript code and view it in log (Logcat? Or anywhere else). I just want to understand the debugging and logging mechanism here.
Anything that is written to the browser's debugging console should be displayed in the Android logs, e.g. console.log('Hello log!') or console.error('Is broke!')
See Console for more info on using the console.
Related
I'm trying to set up Firebase Analytics Debug View for Flutter Web.
I have read the documentation provided, and it says:
To enable Analytics Debug mode in your browser, install the Google Analytics Debugger Chrome extension.
But since I'm running Flutter Web on VSCode I'm not able to install an extension on that Chrome Web Server.
Since it got installed by default with the Flutter SDK, I don't know how to configure it or where to look for documentation.
Does anyone have an idea of how I could proceed?
You can easily use the DebugView with the Chrome extension. If you run Flutter Web as a Web Server, just open your App with Chrome. Be sure the extension is installed and running. Also be sure that Firebase is correctly set up for Web. Then it works!
I am trying to debug a Cordova app that makes use of native plugins (for authentication, API access etc.). Therefore the app does not run from the browser/Ripple.
I am using Visual Studio Tool for Apache Cordova (TACO) now to emulate and put breakpoints/watches and single step through the code to debug. I am wondering if there are any good alternatives to single step through the code for Cordova apps with platform specific plugins.
It would be nice if it was possible to debug without relying in Visual Studio while developing. Are there solutions for this that work with other IDEs?
If you are testing on android while you're device is connected through ADB you can go on chrome://inspect on a new tab in chrome. When cordova app is running you can select inspect and debug like a web page your running app.
You can debug Android native code in Android Studio, iOS code - in XCode (on OSX).
Windows plugins code is best to debug in Visual Studio.
Visual Studio Code editor is handy to debugging the app (js) code (it also supports livereload if you have Ionic installed).
If you want to debug platform specific Plugin code then you have to use Visual Studio, Android Studio for sure.. Don't know about iOS..
I have tried to integrates react-native with an existing android app.I followed Official guide.When everything was done. I started the development server then run my android app.I got the following error.
In genymotion
In chrome console.
How to solve this problem.Thanks for any suggestion.
I was just exploring the ng-coradova for ionic and came accross this, I'm not getting how to run this App in mobile to test the device Api's
Here is what i did.
Cloned and moved to WIP-coradovaReady-new branch
Went into the demo folder
did ionic platform add android
then ionic build android
The Apk was generated but no functionalities worked when I installed it in phone.
Can anyone pls help or guide If I'm missing anything
chrome remote debugging shows empty screen
Hello I downloaded and installed node.js as I have done million times also I installed cordova as mentioned in their docs. Furthermore I installed console.plugin with "cordova plugin add org.apache.cordova.console". Finally I did cordova build android and the cordova emulate android, and inside www/js/index.js onDeviceReady I simply entered this console.log('test');
I'm new with cordova and I cant figure out why I dont see and output in my terminal.
PS: I'm on ubuntu 12.04 LTS 64bit, and I dont use eclipse. Shouldn't I see the console.log output in my terminal window ?
From the CLI run your Android project and display console output from chromium (if using Crosswalk) or SystemWebViewClient. View Debugging priority and above logs from these places, and silence everything else.
cordova run android && adb logcat chromium:D SystemWebViewClient:D *:S
Using alert() is a rather dilettantish debug methodology. The most simple is to use a hardware device or an emulator with adb and chrome://inspect. This provides the debug bridge for the Cordova WebView, as well as the JS console, JS debugger, DOM inspector, etc. within Chrome.
See Get Started with Remote Debugging Android Devices.
The output will appear in an output window, not in the terminal window.
I run my Android Cordova apps in Eclipse and logs appear in the Logcat output window, similarly with iOS apps and Xcode, they appear in the Xcode output window.
You could always just alert() or navigator.notification.alert() to quickly see your logged values.
Hope this helps.