Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrianherrera/jdivisitor
Java library for building custom debugger applications using the Java Debug Interface (JDI) and the visitor design pattern
https://github.com/adrianherrera/jdivisitor
Last synced: 2 months ago
JSON representation
Java library for building custom debugger applications using the Java Debug Interface (JDI) and the visitor design pattern
- Host: GitHub
- URL: https://github.com/adrianherrera/jdivisitor
- Owner: adrianherrera
- License: mit
- Created: 2014-12-03T11:36:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-04T10:42:33.000Z (over 9 years ago)
- Last Synced: 2023-02-26T04:26:52.583Z (almost 2 years ago)
- Language: Java
- Size: 176 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JDIVisitor
==========JDIVisitor is a Java library for building custom debugger applications using the Java Debug Interface (JDI) and the visitor design pattern. It draws inspiration from [jfager](https://github.com/jfager)'s [jdiscript](https://github.com/jfager/jdiscript) project. However, JDIVisitor eschews jdiscript's script-like design in favour of a more Java-esque library. An advantage of using the visitor pattern is that the visitor object can encapsulate and maintain state as it handles JDI events, allowing for complex debugger applications to be constructed.
## License
GNU GPL v2.0## Usage
The following steps can be used to create your custom debugger application:1. Implement an `EventRequestor` class that requests specific JDI events that will be handled by your debugger
2. Implement an `EventVisitor` class that describes how to handle the JDI events enabled in Step 1
3. Connect to the target virtual machine using either the `LocalVMLauncher` class (creates and starts a local virtual machine in debug mode) or the `RemoteVMConnector` class (attach to a virtual machine already running in debug mode over a network). Note that using the `RemoteVMConnector` and an appropriately-configured sandbox is the safer choice if you are working with malicious Java applications
4. Instantiate a ``Debugger`` object using the `VirtualMachine` object returned from Step 3
5. Call the debugger's `requestEvents` method with the `EventRequestor` implemented in Step 1
6. Call the debugger's `run` method with the `EventVisitor` implemented in Step 2## Examples
See https://github.com/adrianherrera/jdivisitor-examples.