Solved Unable to effectively debug a Java application using Intellij

I am attempting to debug a Java application in intellij and am unable to reference 'this', so it is very difficult to debug because I have absolutely no contextual information. While I am able to set breakpoints and it appears execution does stop there, I cannot see any of those values.

My environment is openjdk15, Intellij CE 2021.3 (custom build, but stock build of 2020.2 was still problematic). I am running my Java application from the cmdline using java -jar and then attaching Intellij remotely on port 5005 which works on other platforms.



Has anyone else encountered any such issues?

Debugging is essential to develop.
 
Last edited:
I updated to Intellij 2021.3.2 and am not having this issue any longer. I'm not sure what changed, but it appears to work now. It is a huge relief to have a working IDE!
 
Let me have a look ... I haven't programmed in Java at home for quite some time and have reimaged my machine. I'll hopefully report back shortly. While I have OpenJDK18 installed, I don't believe that would work with Intellij, I think it had to be 11 or 17.

EDIT 1:
18 does not work with a reflective access error
11 does not work with a SIGSEGV. I thought it was working under that. I also disabled ASLR, but that didn't help either:

sysctl kern.elf64.aslr.enable=0
sysctl kern.elf32.aslr.enable=0

EDIT 2:
I get the same error with 17 as I did with 18.

EDIT 3:
Okay, for 2020.2.3, it is 8. Now this makes sense, for the one that is in the bug report, I believe that has to be 11. Now, let me see if I can build the one in the bug report. I wish that would get included ...

EDIT 4:
I installed the updated port, 2021.1.3, and it runs only on JDK11, not 17. Also, the fonts are not crisp. I recall having to do something to fix the fonts, but I don't recall what that is.
 
I see that it was closed as a duplicate, best not to open new bugs reports for the same thing. Instead, we need to see what needs to happen to get traction on this one.

As indicated, I'm only using 11.
 
I see that it was closed as a duplicate, best not to open new bugs reports for the same thing. Instead, we need to see what needs to happen to get traction on this one.

As indicated, I'm only using 11.
There is another solution for vscode. I've installed openjdk19 and configured to use it in IDE.
There are few steps:
  • Install Extension Pack for Java from IDE
  • Add environment JAVA_HOME for .profile
Code:
export JAVA_HOME="/usr/local/openjdk19"
export PATH=$JAVA_HOME/bin:$PATH

Maybe it will be useful.
 
Back
Top