Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
1.5+ JVM 有一个-javaagent开关,可以在加载时检测字节码。像Byteman这样的工具使用它来将跟踪代码注入到 Java 字节码中,因为它是由 JVM 加载的。
-javaagent
Mono CLR 是否有等价物?
对于跟踪,您可以使用分析器挂钩。我不建议在加载时进行实际检测,主要是因为对于已签名的程序集,修改它们会破坏它们的可验证性。