Instrument
Add debug output to any method — dependency or project code — without changing source.
Instrument a method to see args, return values, exceptions, and timing as structured JSON. No source changes, no dirty diffs. Two-step workflow:
mvn jackknife:instrument -Dclass=com.example.Foo -Dmethod=bar
mvn test
Debug output appears as JSON during your test run:
JACKKNIFE {"event":"call","time":"12.3us","class":"Foo","method":"bar","args":["hello"],"return":"world"}
- DependenciesInstrument methods in compile, runtime, provided, and test-scoped dependencies.
- Project CodeInstrument your own classes in src/main and src/test.
- MatchingFrom one method to an entire package — control what gets instrumented.
- ModesDebug mode shows everything. Timing mode shows just elapsed time.