Skip to content
/ ulyp Public

Simple and small recording debugger for JVM-based apps

License

Notifications You must be signed in to change notification settings

0xaa4eb/ulyp

Repository files navigation

Price Build Status Quality Gate Status Maintainability lines of code

TL;DR

Ulyp instruments all third-party library classes and record their method calls including return values and arguments, so that you can have a better understanding of what your code does. Instrumentation is done by byte-buddy library. UI is written using JavaFX.

Here is the example of recorded execution of Hibernate framework

```
@Transactional
public void save(Person person) {
    personRepository.save(person);
}
```

Hibernate call recorded

Example of usage

Usage is relatively simple.

  • First, download or build the agent

  • Second, use VM properties in order to enable the recording. Here is the minimum set of options one will need for recording.

    -javaagent:~/Work/ulyp/ulyp-agent/build/libs/ulyp-agent-0.2.1.0.jar
    -Dulyp.methods=**.HibernateShowcase.save
    -Dulyp.collections=JAVA
    -Dulyp.constructors
    -Dulyp.file=/tmp/hibernate-recording.dat
    

Whenever methods with name save and class name **.HibernateShowcase (inheritors including) are called, recording will start. The data is written to the specified file which can later be opened in the UI.

Similar projects

Ulyp is POC and unstable all the time since the beginning. There are already similar projects which you might consider to use before Ulyp.

Project Link Source
Bugjailbugjail.comClosed source
Findtheflowfindtheflow.ioClosed source

Build from source

Build agent (no tests): ./gradlew :ulyp-agent:shadowJar

Build UI jar file (Java 11+ (preferred) or Java 8 Oracle with Java FX bundled) : ./gradlew :ulyp-ui:fatJar

UI jar file for a particular platform can be built as follows: ./gradlew :ulyp-ui:fatJar -Pplatform=mac

Available platforms for the build are: linux, linux-aarch64, win, mac, mac-aarch64

Key details

All instrumentation is done using byte buddy library. All Java objects are recorded by the recorders. Each recorder supports a particular set of Java types and is responsible for serializing object values into bytes. Note that Ulyp doesn't fully serialize objects. Let's say, for String the first couple of hundred symbols are only recorded.

All data is written to file in a flat format. UI later uses RocksDB in order to build the index

UI

UI Controls

Hotkey Action
Hold ShiftShow full type names
Hold XShow method call duration (if enabled with -Dulyp.timestamps while recording)
Press =Increase font size
Press -Decrease font size