Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remote debug without source code

I am connecting to a remote jvm and debug it. Some classes are generated in runtime and eclipse can not step through such classes.

How can I debug such classes without source code? I want at least to be able to step through bytecode of such classes.

Thanks

like image 839
michael nesterenko Avatar asked Feb 26 '26 11:02

michael nesterenko


1 Answers

I'll sugguest Btrace, BTrace can be used to dynamically trace a running Java program (similar to DTrace for OpenSolaris applications and OS). BTrace dynamically instruments the classes of the target application to inject tracing code ("bytecode tracing").

In one world, write a btrace script, specify target method with annotation, then you can trace the data and behavior of jvm from outside by Btrace.

This is quite useful to debug Java program in production environment and programs without source code.

like image 135
Weibo Li Avatar answered Feb 28 '26 02:02

Weibo Li



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!