How to Use the Java Debugger

Asked 1 years ago, Updated 1 years ago, 108 views

Hello, the attached picture shows the values of the variables that can be seen when using the Eclipse debugging function.

I want to extract variable values like the contents of the Variables tab in the picture, but I have a vague idea that I can use JDB source code or API, so I don't know how.

I'd appreciate it if you could give me some advice on which method to use would be effective!

java jdb debugger

2022-09-22 21:14

1 Answers

ByteCode Instrument (BCI) is the most convenient.

This means that you can modify the byte code by intercepting it before the class is loaded on the jvm.

Insert the byte code to intercept the class and output the variables you want to probe.

In Java, the BCI function is possible through the agent and jvm option uses javaagent.

There are many typical byte code modification libraries such as ASM and Javassist.


2022-09-22 21:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.