RuntimeSearch is a debugger extension which searches the given text in the values of all string expressions in a running program. For a demonstration, see the website.
- Create an empty project in IntelliJ IDEA.
- Import the supplied modules (Agent and Plugin) through File > Project Structure > Modules > "+" > Import Module.
- Build the agent: Maven Projects > searchagent > Lifecycle > package.
- Build the plugin: Build > Prepare Plugin Module For Deployment.
- Install the plugin (File > Settings > Plugins > Install plugin from disk).
- In the Run/Debug Configuration of the program to be instrumented, add a VM option: -javaagent:...PATH_TO_AGENT_DIR.../searchagent-1.0-SNAPSHOT.jar=...INSTRUMENTED_CLASSES_REGEX..., where the class names use a slash notation, e.g. javax/swing.
- Add a helper breakpoint: Run > View Breakpoints > "+" > Java Exception Breakpoints, type "UnknownError", press OK.
- Debug the program, use Navigate / Find in Runtime, etc.