How to get the IDE debugger to use the OpenJDK source code instead of the decompiled class files?
Chen Liang
liangchenblue at gmail.com
Sat Jul 13 01:15:40 UTC 2024
Hi Anil,
If you want to use your local JDK, first build with "make images" and then
add the JDK in this directory:
<JDK git repo>/build/<config name>/images/jdk
"config name" should be chosen by you or configure, looks like
"windows-x86-64-server-release"
Note there's an exploded jdk at /jdk instead of /images/jdk; the one not in
images is exploded and does not have sources.
Regards
On Fri, Jul 12, 2024 at 7:55 PM Anil <1dropaflame at gmail.com> wrote:
> 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/912f7839/attachment.htm>
More information about the build-dev
mailing list