Reputation: 1863
When debugging my application the way to get to the immediate next step in my program's execution cycle is by clicking on "Step Into". The problem is that I almost always end up in classes of the Java Class Library, which do not interest me, so I get out of those with "Step Return".
Is there a way to "step into" my code but skipping code that I did not write?
Upvotes: 3
Views: 704
Reputation: 10106
Use Step Filtering.
java.*
. I recommend the other defaults too like javax.*
.apache.common.*
).This option controls step filters to always return from a filtered location or step through to a non-filtered location.
For example, ifjava.util
is a filtered location, stepping into code inHashMap
could result in a call-back to your application code to check the equality of an object. If you choose to Step through filters a step into would end up in your application code. However, when the Step through filters option is disabled, a step intoHashMap
would behave like a step over.
Source
You can easily enable/disable step filters using the Use Step Filters option in the toolbar or the Run menu. Shortcut: Shift-F5.
Upvotes: 5
Reputation: 1010
I think Step Out would allow you to do this once you hit the Java code. If memory serves, this is shortcut by F7
Upvotes: 0
Reputation: 5522
Use breakpoints. Say you have code like
lineX
lineY
lineZ
You are currently on line X and know that line Y will do stuff using Java / Library code which does not interest you, you can put a breakpoint at line Z and move directly to that (in eclipse you do F8 to go to next break point). Line Z can be in a different class or method, so you need to know the location of next executable line to apply the breakpoint properly.
Upvotes: 0
Reputation: 10249
No.
You can not "step into" and skip code you didn't wirte.
BUT, what you can do is using more breakpoints and simply forward to the next breakpoint using "Resume"
Upvotes: 0