Recaf icon indicating copy to clipboard operation
Recaf copied to clipboard

The bytecode obtained through 'Attatch to remote' is not the bytecode actually run in the JVM

Open meiMingle opened this issue 4 months ago • 2 comments

Describe the bug

Sometimes we want to verify that our agent works as expected by viewing the bytecode that actually runs in the JVM.

To Reproduce

Steps to reproduce the behavior:

  1. Create an agent.jar file, which modifies the bytecode of a class.
  2. Start the project with the -javaagent:agent.jar parameter and connect to it using Recaf's Attach to Remote link.
  3. View the decompiled output of the target class and compare it to its actual behavior.

Exception

Screenshots

meiMingle avatar Sep 03 '25 16:09 meiMingle

https://github.com/Col-E/InstrumentationServer/issues/7 - Known issue - Not really dug into a proper fix yet.

Col-E avatar Sep 03 '25 17:09 Col-E

This project seems to be a good reference https://github.com/alibaba/arthas

meiMingle avatar Sep 04 '25 16:09 meiMingle