It is possible to trace a transaction with debug_traceTransaction. But it needs the transaction hash, requiring it to be a transaction in first place.
I'm debugging a function call that generates a revert, and I want to recover the parameter passed in the revert opcode.