Eclipse stepping into class in android

放肆的年华 提交于 2019-12-04 04:54:16

Depending on how you "step" you may be run through some platform/SDK code while moving between Activities even if your code seems to be running clean. To work around this I set a breakpoint somewhere within the next Activity and step through the current Activity and then once I hit the end of the code I hit resume and it breaks in my next Activity skipping any code that is not mine. Not the most elegant, but it works for me.

In Debug you will always be run through the exception handling platform..

not sure if it works for Android, but for Java SE you can set Step Filtering in the preferences to avoid stepping into some package/class:

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

Mark "Use Step Filters", add the packages and classes to ignore, mark "Step through filters".

Eventually you need to turn off the "Suspend execution on uncaught exceptions" to avoid the debugger stopping in case of an exception:

Window -> Preferences -> Java -> Debug

In Eclipse:

F5 = go into; F6 = jump over; F7 = go upwards: F8 = go to next breackpoint or exit

I always use it like this and never had a problem. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!