简体   繁体   中英

How can I skip JRE code when debugging in Eclipse?

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.

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

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

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

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

Debug Window
在此输入图像描述

Right click on desired class, click on Filter Type :
在此输入图像描述

In next time your Step Filter will skip this type.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM