When I run my app on my phone from eclipse, it always runs in debug. This has only recently started to happen. I guess I must have inadvertently changed a preference or something, but can't work out what. Does anyone know how I can switch it back so I can run without debugging?
Thanks in advance
TAO
I found someone else reporting the same error
http://osdir.com/ml/AndroidDevelopers/2009-08/msg00603.html
They resolved it with a phone restart.
The same worked for me.... how frustrating!!!!!!
At least its working now.
Massive thanks Aaron Digulla for our help.
TAO
Check the VM options in the project's properties. There should be something like -Xdebug=.... Remove that.
I suggest to duplicate the entry and create a second one without the debug options. Also note that under Common, you can save the launch config somewhere (for example in your project), so this setup doesn't get lost.
Just ran across this issue.
Sometimes the Eclipse Android dev environment sets the application property android:debuggable="true" in the AndroidManifest.xml file. This will cause your app to run in debug mode regardless of if you press 'run' or 'debug' in Eclipse.
I know this contribution comes a little late, but here it goes. Be sure you do not have any android.os.Debug.waitForDebugger() method invoked since your code. If so, just remove or comment it and rerun your application.
Related
I ran my program just fine a few minutes ago, and when I added more functionality now it is telling me "The JRE Instance Default XSLT processor does not support debugging_ Would you like to debug using the default Xalan 2.7.1 processor instead?"
I did restart Eclipse maybe that has something to do with it? :/
It's my first times writing an app so if I have to set something in eclipse each time maybe that's why? and what is it if that is the case.
Thanks!
You were in an XML file when you hit debug, I would bet. Happens to me all the time. For some annoying reason it does something entirely different that I don't understand when you do that. Delete the .out.xml that should probably have been created, open a .java file, and try to debug again. Another way is to just right-click your project and do Run As > Android Application.
any best way to debug exception unless using logcat since the overall code are very big? do u think using break point to view the value if installing apk into actual android phone and running it on the phone via usb cable?
do u think using break point to view the value if installing apk into actual android phone
If this means, 'can you debug using breakpoints on the actual phone?'. The answer is Yes
Here is a tutorial you can follow
The size of the codebase is mostly irrelevant when trying to find the cause of an exception (It might complicate things a little, but in general the procedure is the same as debugging a small application). Debugging is the most efficient way of finding bugs, because you're running directly inside your application and you will not have to speculate about the current state of your application (you can actually look at it).
I suggest that you...
Get familiar with Eclipse debugging
Read the stacktrace
Try to find the exact line in the code where the exception happened (according to the stacktrace)
Set a breakpoint at the exact line or at the beginning of the method
Restart you application and wait until you hit the breakpoint
Inspect the variables using the tools in Eclipse
Hope that helps.
i have some problem when i want to Debug my android code. When i go to Debug as/ it says (none applicable). I have set a breakpoint though there's no blue arrow on it. Anyone who knows why this is happening?
Thanks
You should setup your debug configuration. It should know what avd to use to launch your code on. If you're using eclipse this article should help.
I'm android developer and I use Eclipse.
Sometimes, when I am debugging my apps, Eclipse doesn't stop on my breakpoints. Eclipse shows a "v" symbol on the breakpoint. I think this symbol means that Eclipse has passed the breakpoint without problems, but I would like Eclipse to stop when it reaches the breakpoint.
Of course, I have pressed the debug button (the icon with the green bug on it.)
How can I avoid this behavior?
Most likley your source and class files run out of sync. If this happens clean and rebuild your project. This should make the issue disappear.
solved, it's because i have that activity in another process in the manifest... wow
Old post - but pulled my hair out for a few hours with intermittent trace/breakpoints, so this may help someone.
The solution for me was simply to use the --clean flag to start Eclipse, so ./eclipse --clean
I'm having a troubling problem testing some code for and Android app. My app has two parts, and activity where the user changes some settings, and a broadcast receiver that responds to SMS messages, both in the same package.
Here's the problem, I first implemented some simple code to test out the broadcast receiver and the activity, and both worked fine. But then as I tried to refine the code, I noticed the emulator wasn't picking up any of my changes. Event went so far as to uninstall the app from the emulator and try again, no luck. Then I added some extra Toast popups to my receiver, nothing, still running the old code. I know its running the old code because its sending out an SMS using a string constant that is no longer in the current code, so it should be impossible that it respond with that value.
Here's the kicker that has me confused. For fun I made a change to my activity. Ran the project from Eclipse and that change showed up! Tried to test the receiver code again, runs the old code that doesn't even exist anymore!!
How in the world can half the package update, and the other half not?
Can anyone help me out 'cause I'm about ready to lose my mind.
I had a similar problem. Changes made to classes imported from another project didn't get picked up by eclipse, but those made to classes in the current android project were.
Making a change to the current android project (inserting a blank line and deleting it) seemed to make eclipse pick up all the changes made and upload the app to the emulator.
I had this problem too, Now I found a working solution. Just follow these steps:
Run your project normally.
When emulator started, run your project again (DO NOT close the first emulator)
Then the updated application will be uploaded into emulator
I can't really be sure what happened but creating an new emulator image appeared to solve the issue.
I don't know why it happens but it's a problem I have all the time.
What I typically do is
Close the emulator
Close Eclipse
Reopen Eclipse
Clean the projects (in Eclipse, select Project -> Clean... -> Clean all projects)
Rerun the emulator
Annoying as hell but seems to work for me.
I'm having this problem too. It mostly happens when errors are entered into the code. The strange thing is if I go back to the original code, Eclipse doesn't revert to the original code. One thing that seems to help is to temporary delete the contents of a file, save, and rebuild, and then enter the contents back into the file, save, and rebuild.
How is one supposed to debug in such an environment?