I'm debugging microservices based Java web application in IntelliJ. Currently I'm using database dump to setup acceptable start state before debugging. To retry the execution, I need to restore the database as calling the service changes the end state. This method works for retriable debugs but is somewhat tedious.
Then I thought it would be cool to record the first execution with real dependencies, and replay it in debugger with mock responses from external dependencies. This way, subsequent debugging would be possible in isolation without real database and upstream services. It would be even cooler to serialize the recorded execution in file, ship it to issues tracker and load unit test mocks from it.
Is there some library or agent allowing such save and replay functionality?