Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I skip JRE code when debugging in Eclipse?

Tags:

When debugging in Eclipse, I step into (F5) a statement such as the following,

encryptedBytes = LightWeightEncryptor.encrypt(messageBytes, password.toCharArray()); 

the debugger steps into JRE method String.toCharArray(), but I want it to skip that and step into my own code, LightWeightEncryptor.encrypt.

I get tired of having to step out of the JRE code and step back into my own. I've seen lots of ways to step into JRE code, but I can't find a way to avoid it.

like image 714
FoxheadRaven Avatar asked Nov 08 '13 02:11

FoxheadRaven


People also ask

How do I skip all Debug points in Eclipse?

Eclipse define one command "skip all breakpoints", but no "enable all breakpoints". We can just change "skip all breakpoints" command to "toggle all breakpoints". Now we can map "toggle all breakpoints" to shortcuts and use it to enable and disable all breakpoints.

How do I skip a loop while debugging?

You can add a breakpoint after the loop and click F8 (resume). The debugger will stop on the next found breakpoint, e.g. you will have skipped the loop(s).


Video Answer


2 Answers

Try Eclipse menu : Window -> Preferences -> Java|Debug|Step Filtering.

Toggle "Use Step Filters", you may choose the step filters from the checkbox list.

E.g. check "java.*", then the JRE method String.xxx() will be skipped.

like image 158
kshen Avatar answered Sep 24 '22 22:09

kshen


You can add types built on the fly, or types that you have dificulty to find going to:

Debug Window
enter image description here

Right click on desired class, click on Filter Type:
enter image description here

In next time your Step Filter will skip this type.

like image 39
danilo Avatar answered Sep 24 '22 22:09

danilo