Eclipse goes into class in android

I have a simple Android project that I am trying to debug inside Eclipse. When I run it in debug mode and use the "Step Over" button, it often seems to want to go into Android code (I donโ€™t want this to be done the same way that the C debugger didnโ€™t get into libc). I get a screen that looks something like this:

Class File Editor Source not found: The JAR file blahblah/android.jar has no source attachment. You can attach the source by clicking attach source 

I donโ€™t want it to fall into Android or Dalvik code at all (even if I could install the source code). I'm only interested in my personal code.

+7
source share
3 answers

Depending on how you โ€œstep,โ€ you may run some platform / SDK code while moving between actions, even if your code runs clean. To get around this, I set a breakpoint somewhere in the next action and go through the current activity, and then when Iโ€™m at the end of the code, I click โ€œresumeโ€ and it breaks in my next action, skipping any code that doesn't is mine. Not the most elegant, but it works for me.

In Debug, you will always work on an exception handling platform.

+3
source

not sure if it works for Android, but for Java SE you can configure step filtering in the settings to avoid switching to any package / class:

 Window -> Preferences -> Java -> Debug -> Step Filtering 

Check "Use step filters", add packages and classes to ignore, check "Step filters".

enter image description here

In the end, you need to disable "Pause execution on uncaught exceptions" to avoid stopping the debugger in case of an exception:

 Window -> Preferences -> Java -> Debug 
+7
source

In Eclipse:

F5 = go over; F6 = jump; F7 = go up: F8 = go to the next breackpoint or exit

I always use it and have never experienced a problem. :)

+1
source

All Articles