24

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.

1
  • place a breakpoint after this line, and run debug. Commented Nov 8, 2013 at 2:29

2 Answers 2

34

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.

Sign up to request clarification or add additional context in comments.

3 Comments

I think I love you. This is an awesome tip, and I wish I had this years ago.
@kshen, do you know how to do this in netbeans. I can't seem to find this option in the menus
@peeskillet, I am not familiar with netbeans. However, I would suggest you to file a Stackoverflow question with the netbeans tag. Hope the netbeans community could help. :)
2

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.