2 days ago my chrome remote debugging of my ionic application was working perfectly. Now however with no changes my remote debugging will not display scope variables.
The Scope section of the remote debugger just says: "Not Paused". This appears always, including when the application is paused on a breakpoint.
I am guessing that the issue may be related to the fact I am debugging with source maps. I did a quick debug session vs a normal web page running in chrome on my tablet, and I could see scope variables that way. This leads me to believe it is potentially related to using source maps.
Additionally, there is an error at of the top of the debugger that says:
"Consider disabling Chrome Data Saver while debugging".
I can't say for sure if this error was always there or not, but I don't recall it being there previously.
However, data saver is off on both the PC and the tablet, which seems it should preclude that error from being shown.
I have been searching but I have only found one other thread related to this issue, and it appears it was never resolved. However, the thread matches my issue exactly:
https://github.com/google/WebFundamentals/issues/4463
Attached is a screenshot of the problem in action.
Debugger screenshot
I can still use the Watch section to see what is going on in my scope variables by typing them in (as you can see in the example screenshot).
Here is the chrome version information off chrome running on my PC:
Google Chrome 65.0.3325.181 (Official Build) (64-bit) (cohort: 65_win_181)
Revision dc3469be277cc962ba01d9c0cb5bb1a265676c36-refs/branch-heads/3325#{#725}
OS Windows
JavaScript V8 6.5.254.41
I have a Galaxy Tab A (2016) with S Pen.
The tablet is running Android version 7.
Any ideas anyone has to figure out what is going would be very appreciated.
Will
Eventually, for reasons I could not figure out, my app lost the ability to speak to my computer over WebSockets altogether.
Running this command seems to have fixed both my original problem and my new problem.
cordova plugin add cordova-plugin-websocket
I already had a websocket lib installed, but perhaps this one was better.
I hope that helps anyone else that has gotten stuck with this problem.
Will
Related
I've been working with PhoneGap for about two weeks now, yesterday I've build a new android app all went well except that the app starts very slow on my android device. It first shows me for three seconds just a black background except the navbar. So I want to ask how to boost it up or which files I could remove or what I've done wrong please I would be happy if you explain me also the file structure. Thanks in forward for your answers!
Your question is little bit vague. Please, give us more information about your app, about your config and what you’ve already tried.
If my app is slow on any device, I do generally the following:
Check if the same problem occurs in the browser
What’s going on at the start of the app in the browser (Chrome Dev Tools)
If nothing unusual happens, check the logs on the device
For Android, I’m using Logcat for checking what’s happening on the phone.
In order to use Logcat:
1.) Enable debugging mode on your Android phone
2.) You need Android Studio
3.) Connect your phone to your computer and start Logcat in Android Studio 3.1.2
4.) Check the logs while you are starting your app on the phone
Just started working with Ionic the other day, installed most recent version of framework and all required dependencies on my 2015 Macbook Air running El Capitan.
Everything seems to be working OK with the exception of this issue:
When trying to use the live reload option for development with my usb-connected android phone (via command "ionic run android -l"), I receive the following error message on my phone:
Webpage not available
The webpage at http://[local IP and port of my computer] could not be loaded because:
net::ERR_ADDRESS_UNREACHABLE
Note: I don't receive this message when I leave out the -l option.
I know that others have had this issue and I have read virtually all related articles that come up in a google search, but I am still at a loss for a solution.
Some have said this has to do with default restrictions imposed with Cordova whitelist plugin. I tried the changes specified in the below article but to no avail.
https://github.com/apache/cordova-plugin-whitelist
I've tried all other fixes that come up from a google search but without success. As a developer (even a relatively new one) I expect this as par for the course, but the frustration is starting to sink in.
Any help is much appreciated. Thanks.
I think you should see this link: http://blog.ionic.io/handling-cors-issues-in-ionic/
I'm using Cloudpebble to develop a watchface for myself. Everything compiles well and I've not had troubles sending the face to my watch until now.
After compiling the watchface and linking to the phone, it returns an error of "Installation failed. Check your phone for details." However, the phone does not shed any light on what these details might be.
I've checked the usual suspects such as full watch slots and inability to connect to phone, but those were not issues in my case and I'm rather stumped as to what the problem might be. Any help would be greatly appreciated.
Pebble App Version:
2.1.0-beta9 2.1 (Android)
Watch Firmware: 2.7 2.8
Watchface Source: GitHub
UPDATE 11/20:
I didn't mention before that the phone app would crash often when attempting to load my watchface on the watch because I chalked it up to beta software. Today brought watch firmware 2.8 and phone app 2.1 proper, and while the phone app no longer crashes, the mysterious error continues without additional information on the phone.
The answer to my particular issue, as it turns out, was that I had unused fonts. It's not a very obvious problem, so I hope this helps others out.
The main issue really was poor error reporting from cloudpebble due to the lack of error clarification returned from the pebble app to cloudpebble.
I have opened an issue on the cloudpebble github (that's where I found the answer) so if any further developments happen, they'll more than likely be there.
I found that the app had to be on a specific page for it to properly install on the pebble. I found this to be true if I installed on the terminal using the Pebble commands or using the web IDE CloudPebble.
The app has to be on the "My Pebble" scene/activity. Make sure when you attempt to install an app to Pebble that you are on that scene/activity regardless if you are installing using the web IDE or the command line.
I am trying to debug a simple Android application on either the emultor or a device and I cannot get the debugger to stop on any breakpoints I have set. I have combined the other posts here and throughout the web and tried all the suggestions (Add debuggable:"true" to the manifest, stop and start adb, Clean all, make sure I use the debug button not the run button, etc etc). In the Debug perspective I can see the threads and in DDMS it shows the debug icon next to the device I am debugging on. I do see the blue dots where I set the breakpoint and the Debug perspective lists them and says they are active.
I have put in alerts just before the breakpoints to verify the code is getting executed.
Starting to go crazy here. Any other suggestions? I must be missing something simple but non-obvious.
UPDATE: I appreciate the responses so far. Unfortunately they have not solved my problem. I have followed the instruction on debugging and have debugging turned on in the phone. Also, I do see the "Waiting for debugger" alert on the phone when starting. In general everything says I am debugging (including getting logcat output that I have added). It just will not stop on breakpoints that I have added and are listed in the breakpoints tab in the Debug perspective. Also just to reiterate - this happens when debugging on the device as well as on the emulator. One thing I do notice is that when I launch the debugger I have it set to bring up the Android Device Chooser. In there the "debug" column is blank for my device - but if the emulator is running the debug column does say 'Yes'. Also the console states that is attempting to connect to the debugger. Should there be a console log that states that the debugger successfully connected? I do not see this.
UPDATE 20120914: I have been away from this for some time and had given up previously. Back to try and tackle this. It is still not resolved. Everything above is still current - but one other thing I have noticed. I set a Class Load Breakpoint on the main activity and it does stop there. It just does not stop at any Line Breakpoints. I have just updated to the latest JDK 1.7.0_07, Android SDK 20, ADT Plugin 20.0.3. I have used the logcat to output a message and set a breakpoint on this line. I see the message in logcat so I know the code is being executed. The debug window in the debig perspective also does show the android application with a number of threads beneath it and the Devices window in the DDMS perspective shows the application with the green bug icon next to it.
One more thing - when the debugger is running the line breakpoints bullets do not get a checkmark overlaid on them (the Class Load Breakpoint does!). I am guessing this is the root cause - but I don't know why they are not getting this. (By the way skip breakoints is also not set - breakpoints do not have lines through them).
Any new suggestions would be appreciated. I have burned a lot of time on this. It must be something obvious that I am not seeing.
Now I feel a bit stupid writing this post. But I resolved my issue finally. The problem is you cannot set breakpoints in the Javascript code. The part I left out unintentionally is I am writing an app for Android using PhoneGap. Almost all the code is Javascript. I am so used to developing .NET web apps in Visual Studio I just assumed you could set breakpoints in the javascript code. Breakpoints in the Java code happen to work fine. Anyway, Thanks for any suggestions. Do';t know if there are other .NET developers trying PhoneGap development - but maybe this post will help them.
Android SDK provides most of the tools that you need to debug your applications. This link will introduce you to Android debugging environment and the debugging tools used.
Here's also a hands on tutorial on debugging an android application.
If you want to debug using actual android phone, turn on "USB Debugging" in your device:
Settings > Applications > Development and enable USB debugging
Android 4.0:
Settings > Developer options
AND make use of Log.d and your Logcat.
Eclipse has a debug run configuration. Only if you use the debug run configuration will a debugger be attached with the application during launch.
Does the application launch (on the device/emulator) pause a while "Waiting for Debugger" ? If not, then you are not launching the application using "debug configuration". Its the button to the immediate left of run (drop down) configuration.
Try jsHybugger: http://www.jshybugger.org/ for setting javascript breakpoints in Eclipse for remote(mobile) devices.
It lets you set breakpoints, singlestep, catch exceptions, and interact with the JS/DOM environment. You can use it from Eclipse or from a Chrome or Chrome-compatible debugger on the remote desktop. It can be used with apps that create their own webView.
However, you have to install a few files -- but probably no more complicated to use than weinre. it does extensively modify the JS files (on the fly, transparently to the user) to enable all this debugging -- webKit really should support javascript debugging natively.
Make sure you did not check skip all breakpoints (Run -> Skip all breakpoints).
Ribo already mentions it in his answer, but since this question and answers are about debugging Phonegap applications.
You certainly have to look at weinre (WEb INspector REmote).
http://people.apache.org/~pmuellr/weinre/docs/latest/
Nowadays phonegap even has it's own weinre embraced in phonegap build...
http://debug.phonegap.com/
I Am a big fan of this... (note if you are using weinre on your local machine and trying to debug a phonegap app via wifi... make sure your local device is on the same wifi network!)
The title speaks for itself, but I would add some pointers I've noticed along the way.
I would like anyone who also experiences the end result while developing for Android to try to reproduce this and see if this scenario is really the case.
The crash happens when Logcat is overpopulated. By overpopulated I mean that from a point in time, if you would leave a device connected in debug mode for a while, and you would look at the Logcat view, it would display only the new 'delta' lines added to the log in the past short interval of about two seconds.
If you would pay attention, while the Logcat is overpopulated, the device which is been debugged, responds slowly to user interaction (this can be your indication, that the Logcat is overpopulated while testing your application), and perform other actions ridiculously slow.
If you would leave the device connected and more logs would be added, there is a short interval 5-10 seconds, where Eclipse starts to behave weird, and after that, there is nothing you can do, Windows 7 freezes and only hard reboot allows you to get back to work.
I can reproduce this every time, if I would just leave a device connected in debug mode with an application running.
I've Googled this and came up with nothing. I assume that if me and my colleagues encounter this (we have the same Eclipse setup), then other should also experience this, so before posting a bug, I would like to confirm this...
Details:
Windows 7
Eclipse 3.6
ADT 10.0.0.v201102162101-104271 (latest for today)
I have the same problem here. I've been troubleshooting this for months! Mostly because it's been extremely difficult to find anyone with the same issue. (I was actually linked to this post from the bug report that Android Developer provided.)
I've been working with someone on a similar Stack Overflow issue. He thought the problem was his IDE until I reported that I was experiencing the same issue, but with a different IDE. Together, we've been able to whittle the problem down to either the device itself or the drivers. We recently just excluded the USB cables as the culprit.
However, the problems reported in the Google bug report are exactly what we've been experiencing. It makes sense that ADB might be where the problem ultimately lies.
Hopefully, this post will help create some search-friendly connections between the other posts.
Other Stack Overflow post mentioned above -- Android development in IntelliJ IDEA causes computer to freeze
Google bug report, Issue #24171 (originally posted by Android Developer) -- http://code.google.com/p/android/issues/detail?id=24171
I also have a similar problem. Sometimes, the Windows OS completely freeze when an Android device is connected.
I'm not sure why it happens, but I think that it only occurs when the ADB is active.
Here's a bug report I've found recently about this:
adb causes whole Windows operating system to freeze randomly
After using a USB from the back, and installing Windows 8, the problem doesn't occur any more.
However, it's Windows 8, and I wish I used Windows 7. For some reason, Microsoft didn't provide a way to go back...
Try setting your Eclipse Android Settings for the maximum amount of logcat messages in the buffer to a lower value.
This should help
I don't want to jump to conclusions, but I think I've found the real issue which causes this halt...
I'm going to make some assumptions, and if one of these does not fit your scenario, let me know:
Assumptions:
This only happens on a chargeable computer... Be very very sure before dismissing this assumption.
This happens when a laptop is connected to the adapter, and is being charged.
Cause:
This happens when you use a custom adapter, and not one that 100% fit your computer.
According to my experience, once I've used my home adapter on my work computer, the crash reoccurred over, and over, and over... drove me nuts... and when I got back to work, and used the proper adapter, the issue vanished!
Same with my home computer, and work adapter.
Lend me your thoughts...