When debugging JDK source code, you cannot view the variable value. jdk source code
A few days ago, I wanted to take a look at the JDK source code in debug mode. When I entered the debug mode, I found that the variable value in the method was not visible at all. Why? In the current JDK version, after compilation, the debugging information is removed. The solution is to compile the classes with debugging information and use the command javac-g.
I checked some relevant information and put the Solution Below
Note: JDK_HOME indicates the JDK installation path. All commands in this article are executed under d: \ and Its subdirectories.
Simply put, you can also put the rt_debug.jar of the debug version of JDK 7 provided below into the endorsed folder.
References
- Debug jdk source can't watch variable what it is -- stackoverflow
- Java Endorsed Standards Override mechanic -- java guides
- Download rt_debug.jar