ADT debugger always stops at ALL exceptions

by Eric Rizzo » Wed, 18 May 2011 23:22:06 GMT


Sponsored Links
 I'm a very experienced Eclipse user, but some behavior in the debugger
with ADT is confusing and causing a lot of pain.
Every time I'm debugging an app on a device, the debugger stops at ALL
exceptions, even if they're eventually caught. I don't have any
exception break points set up, which would be the expected cause if
this were regular Java debugging.
For example, I use a library that, for good or bad, generates some
ClassNotFoundExceptions during its initialization. These are harmless
and actually caught by the library, not even logged to LogCat. But the
ADT debugger insists on stopping every time one of them is thrown. It
makes debugging this app a real pain, because I have to Resume a bunch
of times every time the app is launched.

Is this intentional behavior of the ADT debugger? Is there a way to
turn it off?

-- 



Re: ADT debugger always stops at ALL exceptions

by snpe » Thu, 19 May 2011 02:33:45 GMT


 Which version of the ADT and SDK you use? Which version of the Android
is on your device ?

Regards,
Peco




-- 


Sponsored Links


Re: ADT debugger always stops at ALL exceptions

by Eric Rizzo » Thu, 19 May 2011 02:42:27 GMT


 Sorry, forgot to include the version info.
Eclipse Helios (3.6), ADT 10.0.1.
My SDK installation includes all releases from 3-11, my project
targets 7 (Android 2.1-update1). Device has 2.2.2.






-- 



Re: ADT debugger always stops at ALL exceptions

by Rick Alther » Thu, 19 May 2011 07:40:09 GMT


 This is basic Java debugging in Eclipse.  In Java or Debug perspective:
   
   - Run->Add Java Exception Breakpoint.
   - Uncheck "Suspend on caught exceptions"
   - Click OK

You can also filter which exceptions you wish to break on here as well if 
you choose.

-- 



Re: ADT debugger always stops at ALL exceptions

by Eric Rizzo » Thu, 19 May 2011 22:00:54 GMT


 Rick,
Like I said, I'm no newbie to Eclipse. I don't WANT to stop at all
breakpoints, but with or without an Exception breakpoint it's stopping
all the time. Doesn't matter if I set up an exception breakpoint with
or without checking "caught exceptions."
Debugging an Android device is behaving differently than standard Java
debugging in this fundamental way. I'm just trying to determine if its
a bug or something that can be configured, or something I'm doing
incorrectly.

Eric





-- 



Re: ADT debugger always stops at ALL exceptions

by Rick Alther » Thu, 19 May 2011 23:03:54 GMT


 In my experience there is no difference debugging an Android application 
than any other Java application.  When I uncheck that preference, I no 
longer stop at any exception that is caught.  If it's still breaking on any 
caught exceptions after that preference has been unchecked, then I am at a 
loss, since that's not my experience.  Have you tried another machine to see 
if it's reproducible there?

- Rick

-- 



Re: ADT debugger always stops at ALL exceptions

by snpe » Fri, 20 May 2011 07:35:25 GMT


 Eric,

I can reproduce the problem with uncaught exception on both: emulator
and device (Android 1.6).
However, debugger doesn't stop on caught exception.
As you, preferences don't distinguish.
Maybe you got some hidden uncaught exception.
Try to add android source ?

Regards,
Peco





-- 



Other Threads

1. How can use mycustomView in layout.xml

Hi Thank you for read this Thread.

I want linked mynewviewClass with layout1.xml controls


But running Emulator app is broken  i want all process in my new View


i don't like that.
setContentView(R.layout.layout1);


i want like this
newclass _listView  = new newclass(context);
setContentView(_listView);


but dont match controls


=======layout1.xml begin===========


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
//my new view class extends View
    <com.test.android.proc.appname.mylistView
      id="@+id/mylistView"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"/>


     <RelativeLayout
     android:layout_width="fill_parent"
     android:layout_height="fill_parent" >


      <ListView
        android:id="@android:id/list"
                android:persistentDrawingCache="animation|scrolling"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="@drawable/bg"/>
    </RelativeLayout>
</LinearLayout>
=======layout1.xml end===========
=======Activity begin===========
public class listAct extends ListActivity{
        /** Called when the activity is first created.
        *...@override
        */
        private friendlistView _listView;


        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);
                _listView = new friendlistView(this);
                setContentView(_listView);
                setListAdapter(_listView.getAdapter());
        }


}//


=======Activity end===========
=======new View begin===========
class mylistView extends CextendedView{
.....some codes

}


=======new View end===========




--~--~---------~--~----~------------~-------~--~----~

2. How link to myCustomView and layout.xml?

Hi Thank you for read this Thread.

I want linked mynewviewClass with layout1.xml controls

But running Emulator app is broken  i want all process in my new View

i don't like that.
setContentView(R.layout.layout1);

i want like this
newclass _listView  = new newclass(context);
setContentView(_listView);

but dont match controls

=======layout1.xml begin===========

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
//my new view class extends View
    <com.test.android.proc.appname.mngView
      id="@+id/mngView"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"/>

     <RelativeLayout
     android:layout_width="fill_parent"
     android:layout_height="fill_parent" >

      <ListView
        android:id="@android:id/list"
                android:persistentDrawingCache="animation|scrolling"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:background="@drawable/bg"/>
    </RelativeLayout>
</LinearLayout>
=======layout1.xml end===========
=======Activity begin===========
public class listAct extends ListActivity{
        /** Called when the activity is first created.
        *...@override
        */
        private friendlistView _listView;

        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);
                _listView = new friendlistView(this);
                setContentView(_listView);
                setListAdapter(_listView.getAdapter());
        }
}//
=======Activity end===========
=======new View begin===========
class friendlistView extends CextendedView{
.....some codes
}
=======new View end===========


--~--~---------~--~----~------------~-------~--~----~

3. ath5k disagrees with the version of struct_symbol

4. Compile Again after new bzImage

5. IMX31 3stack board. Error msg: Warning: unable to open an initial console

6. Does the AndroidManifest.xml file is mandatory to make changes to apk with aapt tool ???

7. Has 3GPP PSS Release 6 been fully supported in cupcake