How to get the IDE debugger to use the OpenJDK source code instead of the decompiled class files?
Anil
1dropaflame at gmail.com
Sat Jul 13 00:54:43 UTC 2024
I am trying to learn the Streams package of the JDK, and successfully built
the jdk.
I set the IDE (IntelliJ Community Edition) to use the JDK.
I put some dummy output statements in a stream method, peek(), and built
the JDK again.
I was stepping through a toy Java program that uses it, but I see that when
it gets to the core/base libraries, it does not use the Java code, but
rather, the decompiled code.
How to get the IDE to use the Java code?
Here is the code I changed in java.util.stream.ReferencePipeline.java
public final Stream<P_OUT> peek(Consumer<? super P_OUT> action) {
Objects.requireNonNull(action);
System.out.println("=========anil 3 ================");
return new StatelessOp<>(this, StreamShape.REFERENCE,
0) {
@Override
Sink<P_OUT> opWrapSink(int flags, Sink<P_OUT> sink) {
return new Sink.ChainedReference<>(sink) {
@Override
public void accept(P_OUT u) {
System.out.println("=========anil 0 ================");
action.accept(u);
System.out.println("=========anil 1 ================");
downstream.accept(u);
System.out.println("=========anil 2 ================");
}
};
}
};
}
thanks,
Anil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20240712/bb392e9c/attachment-0001.htm>
More information about the build-dev
mailing list